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

Failure building on node v6.9.4, windows 7, for --msvs_version= 2012, 2013, and 2015 #56

Closed
mateodelnorte opened this issue Jun 9, 2017 · 3 comments

Comments

@mateodelnorte
Copy link

2012: https://gist.github.com/mateodelnorte/67f124196377a0ca0815c66644bf1082
2013: https://gist.github.com/mateodelnorte/5475b1d28f902e501a29686cf7c91082
2015: https://gist.github.com/mateodelnorte/8c49520a883d7fb20ef8be784ac10a9a

I'm using the a basic, unmodified project created using the yoeman generator napi module plugin.

Here's my binding.gyp:

{
  'targets': [
    {
      'target_name': 'sophis-c-client-native',
      'sources': [ 'src/sophis_c_client.cc' ],
      'include_dirs': ["<!@(node -p \"require('node-addon-api').include\")"],
      'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
      'cflags!': [ '-fno-exceptions' ],
      'cflags_cc!': [ '-fno-exceptions' ],
      'xcode_settings': {
        'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
        'CLANG_CXX_LIBRARY': 'libc++',
        'MACOSX_DEPLOYMENT_TARGET': '10.7'
      },
      'msvs_settings': {
        'VCCLCompilerTool': { 'ExceptionHandling': 1 },
      }
    }
  ]
}
@mateodelnorte
Copy link
Author

After

  • adding C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% to PATH
  • and setting VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140"

I'm able to build with 2015. Can't speak to ability to build with previous versions, but my problem is solved so far. I may run into an issue again, depending on whether some client libs I need require 2013. Will reopen the issue if that becomes the case.

Cheers. ;)

@jasongin
Copy link
Member

jasongin commented Jun 9, 2017

The errors in the 2013 build are due to the use of C++11 language features that are not supported before VS 2015.

The errors in the 2012 and 2015 build are in v8.h, in the node headers downloaded by node-gyp. I think V8 in Node v6.x requires at least VS 2013, and based on your last comment it looks like an older compiler was used.

@jasongin
Copy link
Member

jasongin commented Jun 9, 2017

Feel free to open an issue about VS 2013 support if you need it. At least that can be a place where others can add a +1 so we know whether or not it's something we should work on.

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