GNU bug report logs - #12878
24.2; Compiling failed on Windows 7 with VC 11 Express: _WIN32_WINNT version too low

Previous Next

Package: emacs;

Reported by: 李丁 <iamliding <at> gmail.com>

Date: Tue, 13 Nov 2012 16:15:02 UTC

Severity: normal

Tags: wontfix

Found in version 24.2

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 李丁 <iamliding <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12878 <at> debbugs.gnu.org
Subject: bug#12878: 24.2; Compiling failed on Windows 7 with VC 11 Express: _WIN32_WINNT version too low
Date: Wed, 14 Nov 2012 09:32:01 +0800
[Message part 1 (text/plain, inline)]
Sorry, this piece of code is in w32fns.c (line 143-146), not w32term.c:
   /* Reportedly, MSVC does not have this in its headers.  */
    #ifdef _MSC_VER
    DECLARE_HANDLE(HMONITOR);
    #endif
And it leads to redefinition error under MSVC 11.0.


2012/11/14 李丁 <iamliding <at> gmail.com>

> Sure, adding a correct prototype is just like including the correct header
> file if Windows 9X
> really supports this function. But you should be careful checking compiler
> versions, in case that
> redefinition error occur.
>
> Actually, I encountered several redefinition problems during compilation.
> For example in w32term.c:
>
>     #ifndef GLYPHSET
>     /* Pre Windows 2000, this was not available, but define it here so
>        that Emacs compiled on such a platform will run on newer versions.
>  */
>     ...
>     #endif
>
> VC 11.0 does not define GLYPHSET either (or not included), but it does
> have the definitions,
> and above code leads to redefinition error.
>
> And this in w32term.c too:
>
>     /* Reportedly, MSVC does not have this in its headers.  */
>     #ifdef _MSC_VER
>     DECLARE_HANDLE(HMONITOR);
>     #endif
>
> VC 11.0 does have HMONITOR, and another redefinition error.
>
> Maybe VC 11.0 has not been widely used, but these small problems should be
> resolved.
>
>
> 2012/11/14 Eli Zaretskii <eliz <at> gnu.org>
>
>> > Date: Tue, 13 Nov 2012 19:11:34 +0800
>> > From: 李丁 <iamliding <at> gmail.com>
>> >
>> > I tried to compile emacs 24.2 on Windows 7 with Visual C++ 11.0 Express,
>> > and I found that EnumSystemLocales in w32proc.c and w32select.c were
>> > compiled as is (not as __stdcall function with postfix decorations),
>> which
>> > causes the linking failure.
>> >
>> > I read through the sources and found that config.h defined _WIN32_WINNT
>> as
>> > 0x0400, which corresponds to Windows NT4. However MSDN says that
>> > EnumSystemLocales requires at least Windows 2000 (0x0500). So you should
>> > probably either require a higher Windows version or use some other
>> > mechanism to accomplish what EnumSystemLocales does.
>>
>> Would adding a correct prototype for EnumSystemLocales to w32term.h
>> (included by both source files you mention) do the trick?
>>
>> (I don't want to bump up _WIN32_WINNT, because that might produce an
>> executable which won't run on Windows 9X, which we still try to
>> support.)
>>
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.