Node JS with C++ integration

Node JS with C++ integration

本文关键字:integration C++ with JS Node      更新时间:2023-10-24

我是NodeJS的新手,只是设置了将NodeJS与C++集成的环境。我正在尝试由enobayram使用SWIG提供的NodeJS-C++集成中提到的例子。然而,当我尝试使用节点gyp构建时,它会抛出很多错误。

我的环境

操作系统:Windows 7 Professional x64
Python:2.7.11
节点:v4.4.1
节点Gyp:v3.3.1
微软VS:微软Visual Studio社区2015

D:'Example>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.3.1
gyp info using node@4.4.1 | win32 | x64
gyp info spawn C:'Program Files (x86)'MSBuild'14.0'bin'msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  mylib_wrap.cxx
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(614): error C2061: syntax error: identifier 'uint16_t' [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(642): note: see reference to class template instantiation 'v8::PersistentBase<T>' being compiled
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(620): error C3646: 'WrapperClassId': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(620): error C2059: syntax error: ')' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(620): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1149): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1149): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1154): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1154): error C2143: syntax error: missing ';' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1154): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1228): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1228): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1384): error C3646: 'CachedDataVersionTag': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1384): error C2059: syntax error: ')' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1384): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1143): error C2789: 'v8::ScriptCompiler::CachedData::uint8_t': an object of const-qualified type must be initialized [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1154): note: see declaration of 'v8::ScriptCompiler::CachedData::uint8_t'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1143): error C2614: 'v8::ScriptCompiler::CachedData': illegal member initialization: 'data' is not a base or member [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(1536): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2003): error C2065: 'int64_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2003): error C2923: 'v8::Maybe': 'int64_t' is not a valid template type argument for parameter 'T' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2005): error C2065: 'uint32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2005): error C2923: 'v8::Maybe': 'uint32_t' is not a valid template type argument for parameter 'T' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2007): error C2065: 'int32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2007): error C2923: 'v8::Maybe': 'int32_t' is not a valid template type argument for parameter 'T' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2011): error C3646: 'IntegerValue': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2011): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2011): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2012): error C3646: 'Uint32Value': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2012): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2012): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2013): error C3646: 'Int32Value': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2013): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2013): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2151): error C2061: syntax error: identifier 'uint16_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2156): error C2061: syntax error: identifier 'uint8_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2222): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2222): error C2143: syntax error: missing ';' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2222): error C2433: 'v8::String::ExternalStringResource::uint16_t': 'virtual' not permitted on data declarations [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2222): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2305): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2301): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2310): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2310): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2311): error C2556: 'v8::MaybeLocal<v8::String> v8::String::NewFromOneByte(v8::Isolate *,const int)': overloaded function differs only by return type from 'v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate *,const int)' [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2305): note: see declaration of 'v8::String::NewFromOneByte'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2311): error C2371: 'v8::String::NewFromOneByte': redefinition; different basic types [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2305): note: see declaration of 'v8::String::NewFromOneByte'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2318): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2314): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2323): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2323): error C2143: syntax error: missing ',' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2324): error C2556: 'v8::MaybeLocal<v8::String> v8::String::NewFromTwoByte(v8::Isolate *,const int)': overloaded function differs only by return type from 'v8::Local<v8::String> v8::String::NewFromTwoByte(v8::Isolate *,const int)' [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2318): note: see declaration of 'v8::String::NewFromTwoByte'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2324): error C2371: 'v8::String::NewFromTwoByte': redefinition; different basic types [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2318): note: see declaration of 'v8::String::NewFromTwoByte'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2422): error C2143: syntax error: missing ';' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2422): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2422): error C2334: unexpected token(s) preceding '{'; skipping apparent function body [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2423): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2423): error C2143: syntax error: missing ';' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2423): error C2334: unexpected token(s) preceding '{'; skipping apparent function body [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2426): error C2143: syntax error: missing ';' before '*' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2426): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2426): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2230): error C2789: 'v8::String::ExternalStringResource::uint16_t': an object of const-qualified type must be initialized [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2222): note: see declaration of 'v8::String::ExternalStringResource::uint16_t'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2499): error C2061: syntax error: identifier 'int32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2500): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2501): error C3646: 'Value': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2501): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2501): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2514): error C3646: 'Value': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2514): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2514): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2528): error C3646: 'Value': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2528): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2528): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2595): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2596): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2610): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2643): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2645): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2673): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2674): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2676): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2678): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2808): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2810): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2950): error C3646: 'Length': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2950): error C2059: syntax error: '(' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2950): error C2238: unexpected token(s) preceding ';' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2957): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(2959): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(3075): error C2061: syntax error: identifier 'int32_t' [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(3098): note: see reference to class template instantiation 'v8::ReturnValue<T>' being compiled
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(3076): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(3076): error C2535: 'void v8::ReturnValue<T>::Set(void)': member function already defined or declared [D:'Example'build'mylib.vcxproj]
  c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(3075): note: see declaration of 'v8::ReturnValue<T>::Set'
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4178): error C2065: 'uint32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4178): error C2146: syntax error: missing ')' before identifier 'index' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4187): error C2065: 'uint32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4187): error C2146: syntax error: missing ')' before identifier 'index' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4197): error C2065: 'uint32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4197): error C2146: syntax error: missing ')' before identifier 'index' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4207): error C2065: 'uint32_t': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4207): error C2146: syntax error: missing ')' before identifier 'index' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4246): error C2061: syntax error: identifier 'uint32_t' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4477): error C2061: syntax error: identifier 'IndexedPropertyGetterCallback' [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4494): error C3646: 'getter': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4494): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4495): error C3646: 'setter': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4495): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4496): error C3646: 'query': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4497): error C3646: 'deleter': unknown override specifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4497): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4477): error C2065: 'getter': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4487): error C2065: 'setter': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4488): error C2065: 'query': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4489): error C2065: 'deleter': undeclared identifier [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4492): error C2614: 'v8::IndexedPropertyHandlerConfiguration': illegal member initialization: 'getter' is not a base or member [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4492): error C2614: 'v8::IndexedPropertyHandlerConfiguration': illegal member initialization: 'setter' is not a base or member [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4492): error C2614: 'v8::IndexedPropertyHandlerConfiguration': illegal member initialization: 'query' is not a base or member [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4492): error C2614: 'v8::IndexedPropertyHandlerConfiguration': illegal member initialization: 'deleter' is not a base or member [D:'Example'build'mylib.vcxproj]
c:'users'rtv'.node-gyp'4.4.1'include'node'v8.h(4492): fatal error C1003: error count exceeds 100; stopping compilation [D:'Example'build'mylib.vcxproj]
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'rtv'AppData'Roaming'npm'node_modules'node-gyp'lib'build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:''Program Files''nodejs''node.exe" "C:''Users''rtv''AppData''Roaming''npm''node_modules''node-gyp''bin''node-gyp.js" "build"
gyp ERR! cwd D:'Example
gyp ERR! node -v v4.4.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
D:'Example>

请求您的帮助以解决此问题。
仅供参考,我已经尝试安装不同版本的微软VS,仍然存在类似的问题。

如果这是您第一次使用C++&Node.js集成,您可能会发现从Node.js C/C++插件文档开始最简单。

第一个"Hello Word"示例非常适合熟悉Node的C++需求。

Node.js&C++在最好的情况下可能很棘手。Node.js的各个版本的实现都发生了变化,你会在网上找到很多与当前版本的Node不兼容的例子。