node-gyp problem building with vs2015 w/ update3

Created on 13 Jun 2016  路  5Comments  路  Source: nodejs/node

Hello.I'm using vs2015 update3.
When i try to install libxmljs(which uses node-gyp) i get following error:

C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [D:\node\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]

I have checked delayimp.h and i see

// Prior to Visual Studio 2015 Update 3, these hooks were non-const.  They were
// made const to improve security (global, writable function pointers are bad).
// If for backwards compatibility you require the hooks to be writable, define
// the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this header and
// provide your own non-const definition of the hooks.
ExternC
#ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS
const
#endif
PfnDliHook   __pfnDliNotifyHook2;

Maybe the compilation error has to do with update 3?
Any ideas?
Thanks!

EDIT(@eljefedelrodeodeljefe): decent markdown code blocks

build windows

Most helpful comment

I opened a SO Question with a workaround

All 5 comments

@tasoss have you tried to contact both node-gyp and libxmls maintainers? Can you reproduce your wanted behaviour with an older version of Visual Studio?

In any case I think a ticket for the above repos is more likely to succeed, since likely only there can be the fix.

This was already reported and fixed in node-gyp. However, we still need to propagate the change to npm and node.

Then closing this in favor for https://github.com/nodejs/node-gyp/issues/949

thank you both!

I opened a SO Question with a workaround

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cong88 picture cong88  路  3Comments

mcollina picture mcollina  路  3Comments

willnwhite picture willnwhite  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments

stevenvachon picture stevenvachon  路  3Comments