GNU bug report logs -
#9960
Compiling Emacs trunk with MSVC
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 5 Nov 2011 11:24:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Christoph Scholtes <cschol2112 <at> googlemail.com>
> Cc: fabrice.popineau <at> supelec.fr, 9960 <at> debbugs.gnu.org
> Date: Sat, 05 Nov 2011 14:32:15 -0600
>
> Christoph Scholtes <cschol2112 <at> googlemail.com> writes:
>
> > Then we get to emacs.c:
> > emacs.c(537) : error C2059: syntax error : '<<'
> > emacs.c(537) : error C2059: syntax error : 'constant'
> > emacs.c(537) : error C2059: syntax error : ')'
>
> cl.exe does not like the shift operator in this statement:
>
> static int __declspec(align(1 << 3)) test = 1;
That comes from Fabrice, assuming that removing `static' doesn't help.
Does it fail even if you take (1 << 3) in one more level of
parentheses?
What about an intermediate macro, as in
#define FOO (1 << GCTYPEBITS)
static int __declspec(align(FOO)) test = 1;
?
> Other errors are due to missing definitions in stdint.h. The following
> patch fixes this (64bit support added for completeness):
Thanks, please install this.
> Creating temacs.lib fails when linking with the following errors:
>
> temacs2.lib(font.obj) : error LNK2019: unresolved external symbol _snprintf referenced in function _font_unparse_xlfd
Does this go away if you add "#define snprintf _snprintf" to
src/s/ms-w32.h, for MSVC only?
> temacs2.lib(fringe.obj) : error LNK2019: unresolved external symbol _window_box_right referenced in function _draw_fringe_bitmap_1
> temacs2.lib(w32term.obj) : error LNK2001: unresolved external symbol _window_box_right
These are because xdisp.c defines window_box_right `inline'. (This is
an optimized build, right? if not, does it mean that MSVC inlines
functions even for a non-optimized builds?) I would suggest to make
that `inline' conditional on _MSC_VER being undefined.
> temacs2.lib(xdisp.obj) : error LNK2019: unresolved external symbol _strtoimax referenced in function _message_log_check_duplicate
Add "#define strtoimax _strtoi64" to src/s/ms-w32.h, conditioned on
_MSC_VER.
> libgnu.lib(strftime.obj) : error LNK2001: unresolved external symbol _tzname
> obj/i386/temacs.bin : fatal error LNK1120: 4 unresolved externals
Make this (from src/s/ms-w32.h):
#if !defined (_MSC_VER) || (_MSC_VER < 1400)
#define tzname _tzname
be defined unconditionally. (But leave the "utime" part under the
same condition it is today.)
This bug report was last modified 13 years and 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.