harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Zvolsky" <i.zvol...@gmail.com>
Subject [classlib] _WIN32_WINNT macro redefinition
Date Thu, 14 Dec 2006 07:24:24 GMT
Hi all,

Just wanted to share some experience in building classlib on Windows in my
very first mailing list post. The thing is that some recent commits into
classlb made it vulnerable to "external" setting of _WIN32_WINNT macro.

Here is what I mean: win32.mak from Platform SDK (which is being !included
in classlib's makefiles) appends definition of the _WIN32_WINNT macro to the
$(cflags) variable. The value of the macro depends on the version of SDK
installed. And this may lead to the error while building classlib:

<...skipped...>
     [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -
FIsehmap.h -GS -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WINNT
-D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0500 -DWINVER=0x0501 -Zi -WX -GF -Gs -MD
-Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
/IC:\lab_drlbuild\combined_icl_d\CVS_20061213_0002_H\classlib\trunk\deploy\include
/IC:\lab_drlbuild\combined_icl_d\CVS_20061213_0002_H\classlib\trunk\deploy\jdk\include
/I. /I..\shared\ -Fo..\shared\hythread.obj ..\shared\hythread.c
     [exec] hythread.c
     [exec] thrdsup.h(64) : error C2220: warning treated as error - no
object file generated
     [exec] thrdsup.h(64) : warning C4005: '_WIN32_WINNT' : macro
redefinition
     [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
     [exec]         command-line arguments :  see previous definition of
'_WIN32_WINNT'
     [exec] Stop.

You see, my version of win32.mak from Platform SDK set the marco to
'0x0501', which is not the same in some .h file.

I believe this should be fixed somehow :-)

best regards,
Ivan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message