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
@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.
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
Most helpful comment
I opened a SO Question with a workaround