2016-03-31 10 views
1

ノードJSとC++を統合するための環境をセットアップするだけで、ノードJSを使い慣れています。 私はSWIGを使用してenobayramによって提供されたNode JS - C++ Integrationの例を試しています。 しかし、私がnode-gypビルドを使用しようとすると、大量のエラーが発生します。ノードJSとC++の統合

私の環境

OS:Windows 7のProfessionalのx64の
のPython:2.7.11
ノード:v4.4.1
ノード-GYP:v3.3.1
MS VS:MS Visual Studioのコミュニティ2015

D:\Example>node-gyp build 
gyp info it worked if it ends with ok 
gyp info using [email protected] 
gyp info using [email protected] | 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> 

この問題を解決するには、ヘルプをリクエストしてください。
参考までに、私は別のバージョンのMS VSをインストールしようとしましたが、まだ同様の問題が存在します。

+0

CPPをC++に修正するための@Keithありがとうございます。 – rtv

+0

更新:::私はここにこだわっているので、Linuxでやろうとしました。そこで、Virtual Boxにubuntu 14.04をインストールしました。これで、node-gypを使ってlinuxを構成しビルドすることができましたが、ノード内のファイルを使用するときにはモジュールは自己登録されていません。 – rtv

+0

これはおそらくあなたが探している答えではありませんが、言語間の接続のために配管工事に取り組むのではなく、簡単なTCPプロトコルを設定するか、またはzeromqなどを使用します。 – Amnon

答えて

0

これが初めてのC++ & Node.js統合の場合は、Node.js C/C++ Addons documentationから始めるのが最も簡単です。

最初の「Hello Word」の例は、NodeのC++要件に精通するのに最適です。

Node.js & C++を統合するプロセスは、時代遅れの場合があります。実装はNode.jsのバージョン間で変更されており、現在のバージョンのNodeでは動作しない多くの例がネット上にあります。

関連する問題