Addon requires at least Windows Vista when compiled using VS2012 express

0 views
Skip to first unread message

hesh...@gmail.com

unread,
Dec 3, 2013, 12:43:09 AM12/3/13
to node-...@googlegroups.com
Hi,

I'm having problem with compiling an addon using nw-gyp with vs2012 express. From https://github.com/rogerwang/node-webkit/issues/429 I saw that only vs2010 can be used. But I figured it's only a macro definition problem. So I added:

          'NTDDI_VERSION=0x05010000',
          '_WIN32_WINNT=0x0501',
          'WINVER=0x0501'

to the gyp's targets -> defines section, alongside with _UNICODE / UNICODE, hoping to make it run on Windows XP. Now I'm pretty sure the compiler picked up these macros because TCHAR maps to wchar_t. But dependency walker still shows that my compiled .node file has dependency on FlsAlloc etc functions in kernel32.dll, which were introduced in Windows Vista.

I then tapped into C:\Users\User\.nw-gyp\0.8.0\common.gypi and all the dependencies, adding the above to the defines section, and got the same result.

I've also tried adding these defines to C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp\addon.gypi to no avail.

What am I doing wrong?

Best regards,
He Shiming

hesh...@gmail.com

unread,
Dec 4, 2013, 1:29:16 AM12/4/13
to node-...@googlegroups.com, hesh...@gmail.com
Well if anyone encountered this. It's a bug of vs2012 express. Updating to vs2012 update 4 will address this problem. Apparently the older version will not honor the macros in gyp generated projects.
Reply all
Reply to author
Forward
0 new messages