-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
error compiling win_delay_load_hook.c with visual studio preview 2 #949
Comments
Would const-ifying /cc @piscisaureus |
Yes apparently it looks fine Christian Taltas On Mon, Jun 6, 2016 at 10:28 AM -0700, "Ben Noordhuis" <notifications@github.commailto:notifications@github.com> wrote: Would const-ifying __pfnDliNotifyHook2 in src/win_delay_hook.c work? /cc @piscisaureushttps://github.com/piscisaureus You are receiving this because you authored the thread. |
No objections to const-ification from me. |
https://ci.nodejs.org/job/node-test-commit-windows/975/ <- quick test |
Okay, it clearly doesn't work with older VS versions. I'm not going to look into it deeper but I'll be happy to review patches. |
@orangemocha you have time to dig into this? |
Visual Studio 2015 Update 2 defines __pfnDliNotifyHook2 as const. Fixes: nodejs#949
I am investigating... |
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const. Fixes: nodejs#949
PR: #952 |
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const. The decltype specifier makes the declaration work across all supported versions of VS. It also requires that the source be compiled as C++. Fixes: nodejs#949
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const. The decltype specifier makes the declaration work across all supported versions of VS. It also requires that the source be compiled as C++. Fixes: nodejs#949
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const. The decltype specifier makes the declaration work across all supported versions of VS. It also requires that the source be compiled as C++. Fixes: nodejs#949 PR-URL: nodejs#952 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Just installed the latest Visual C++ Build Tools and getting the same error with Update: The header |
@RanzQ Can you file a new issue and include the build log? |
@bnoordhuis Sorry, this was a false alarm. I'm having some problems installing the 3.4.0. |
Use npm next: Fixes the problem on Win 10 |
The build issue is related to nodejs/node-gyp#949
Apparently <delayimp.h> header changed since visual studio 2015 update 3 setting const to PfnDliHook
// 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.
Probably should include this in win_delay_load_hook.c source file
ifndef DELAYIMP_INSECURE_WRITABLE_HOOKS
define DELAYIMP_INSECURE_WRITABLE_HOOKS
endif
The text was updated successfully, but these errors were encountered: