Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_delay_load_hook.c should be updated. #5088

Closed
shihrer opened this issue Jul 8, 2016 · 1 comment
Closed

win_delay_load_hook.c should be updated. #5088

shihrer opened this issue Jul 8, 2016 · 1 comment

Comments

@shihrer
Copy link

shihrer commented Jul 8, 2016

The win_delay_load_hook.c file should be updated to match [email protected] and to work with the new windows build tools. Making this change lets me build and run nwjs apps using native modules/FFI with node-gyp on Windows.

All that needs to be changed is:

PfnDliHook __pfnDliNotifyHook2 = load_exe_hook;

to

decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;

Reference win_delay_load_hook.cc in the [email protected] repo.

Build error without the change:

win_delay_load_hook.cc
C:\Users\michael\AppData\Roaming\nvm\v6.3.0\node_modules\node-gyp\src\win_delay_load_hook.cc(45): error C2373: '__pfnDl
iNotifyHook2': redefinition; different type modifiers [C:\Users\michael\Desktop\nwjsBench\build\some_lib.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNot
  ifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\michael\AppData\Roaming\nvm\v6.3.0\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\michael\Desktop\nwjsBench
gyp ERR! node -v v6.3.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
@rogerwang
Copy link
Member

Thanks. btw, previously we supported using node binary modules directly but now it's broken due to v8 ABI change in 0.15.x and later. See #5086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants