Giter VIP home page Giter VIP logo

nw-gyp's People

Contributors

agnat avatar bnoordhuis avatar chjj avatar cosmosgenius avatar edef1c avatar fredericosilva avatar gibfahn avatar hitsthings avatar iarna avatar isaacs avatar japj avatar jaybeavers avatar kapouer avatar kunalspathak avatar mhart avatar mmalecki avatar mousetraps avatar mscdex avatar nevosegal avatar panther7 avatar pmed avatar ralphtheninja avatar refack avatar richardlau avatar robertchiras avatar rogerwang avatar rvagg avatar stefanpenner avatar thejaredwilcurt avatar tootallnate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nw-gyp's Issues

cannot build node-sqlite3 for target 0.5.1 on Win

hello to all

I just updated to version 0.5.1 node-webkit, I tried to rebuild node-sqlite3 to version 0.5.1, it gives me a list of errors and some warning (this warnings are presents also with the target 0.5.0 build)

Here's the cmd logs

  sqlite3.c
  sqlite3.vcxproj -> #my_path#\node-sqlite3\build\Release\lib\sqlite3.lib
  database.cc
  node_sqlite3.cc
  statement.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled.Specify /EHsc [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled.Specify /EHsc [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled.Specify /EHsc [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(139): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\database.cc(222): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\database.cc(431): warning C4244: 'argument' : conversion from 'double' to 'int32_t', possible loss of data [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(121): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\database.cc(476): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of data [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(278): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(324): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\database.cc(501): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(371): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(438): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\database.cc(570): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(477): warning C4244: 'argument' : conversion from 'sqlite3_int64' to 'int32_t', possible loss of data [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(503): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(599): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(720): error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void (__cdecl *)(uv_work_t *)' to 'uv_after_work_cb' [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
          None of the functions with this name in scope match the target type
..\src\statement.cc(755): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data [#my_path#\node-sqlite3\build\node_sqlite3.vcxproj]
gyp ERR! build error

I use the window branch of node-sqlite3 with the binding.gyp borrowed from the same version in the main branch... maybe I'm wrong and I'm also lucky, but in the earlier versions all works fine.

node.js = 0.8.23
node-sqlite = windows branch, maybe 2.1.???

many thanks to all suggest me a solution

the same "problem" you can also find it in the issue list of node-webkit

build ref for target 0.7.0 on Win2008 bit64 error

hi every body

build ref for target 0.7.0 on Win2008 bit64 error, use node-gyp is successed.
the error info:

C:\npmpak\node_modules\ffi\node_modules\ref>nw-gyp clean
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info ok

C:\npmpak\node_modules\ffi\node_modules\ref>nw-gyp configure --target=0.7.0
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn python
gyp info spawn args [ 'C:\Users\Administrator\AppData\Roaming\npm\node_mod
ules\nw-gyp\gyp\gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\npmpak\node_modules\ffi\node_modules\ref\build
config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Administrator\AppData\Roaming\npm\node_mod
ules\nw-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Administrator.nw-gyp\0.7.0\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Administrator.nw-gyp\0.7.0'
,
gyp info spawn args '-Dmodule_root_dir=C:\npmpak\node_modules\ffi\node_mod
ules\ref',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\npmpak\node_modules\ffi\node_modules\ref\build',

gyp info spawn args '-Goutput_dir=.' ]
gyp info ok

C:\npmpak\node_modules\ffi\node_modules\ref>nw-gyp --arch=ia32 rebuild --target=
0.7.0
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn python
gyp info spawn args [ 'C:\Users\Administrator\AppData\Roaming\npm\node_mod
ules\nw-gyp\gyp\gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\npmpak\node_modules\ffi\node_modules\ref\build
config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Administrator\AppData\Roaming\npm\node_mod
ules\nw-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Administrator.nw-gyp\0.7.0\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Administrator.nw-gyp\0.7.0'
,
gyp info spawn args '-Dmodule_root_dir=C:\npmpak\node_modules\ffi\node_mod
ules\ref',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\npmpak\node_modules\ffi\node_modules\ref\build',

gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\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=Win32' ]
binding.cc
C:\Users\Administrator.nw-gyp\0.7.0\src\node.h(25): warning C4005: 'V8_USE_UNS
AFE_HANDLES' : macro redefinition [C:\npmpak\node_modules\ffi\node_modules\ref
build\binding.vcxproj]
C:\Users\Administrator.nw-gyp\0.7.0\deps\v8\include\v8.h(41) : see p
revious definition of 'V8_USE_UNSAFE_HANDLES'
..\src\binding.cc(189): error C2780: 'void v8::Persistent::MakeWeak(v8::Isol
ate *,P *,WeakReferenceCallbacks<T,P>::Revivable)' : expects 3 arguments - 2 pr
ovided [C:\npmpak\node_modules\ffi\node_modules\ref\build\binding.vcxproj]
with
[
T=v8::Value
]
C:\Users\Administrator.nw-gyp\0.7.0\deps\v8\include\v8.h(652) : see
declaration of 'v8::Persistent::MakeWeak'
with
[
T=v8::Value
]
..\src\binding.cc(189): error C2780: 'void v8::Persistent::MakeWeak(v8::Isol
ate *,P *,WeakReferenceCallbacks<S,P>::Revivable)' : expects 3 arguments - 2 pr
ovided [C:\npmpak\node_modules\ffi\node_modules\ref\build\binding.vcxproj]
with
[
T=v8::Value
]
C:\Users\Administrator.nw-gyp\0.7.0\deps\v8\include\v8.h(646) : see
declaration of 'v8::Persistent::MakeWeak'
with
[
T=v8::Value
]
..\src\binding.cc(189): error C2784: 'void v8::Persistent::MakeWeak(P *,Weak
ReferenceCallbacks<T,P>::Revivable)' : could not deduce template argument for '
P *' from 'int' [C:\npmpak\node_modules\ffi\node_modules\ref\build\binding.vcxp
roj]
with
[
T=v8::Value
]
C:\Users\Administrator.nw-gyp\0.7.0\deps\v8\include\v8.h(641) : see
declaration of 'v8::Persistent::MakeWeak'
with
[
T=v8::Value
]
..\src\binding.cc(189): error C2784: 'void v8::Persistent::MakeWeak(P *,Weak
ReferenceCallbacks<S,P>::Revivable)' : could not deduce template argument for '
P *' from 'int' [C:\npmpak\node_modules\ffi\node_modules\ref\build\binding.vcxp
roj]
with
[
T=v8::Value
]
C:\Users\Administrator.nw-gyp\0.7.0\deps\v8\include\v8.h(636) : see
declaration of 'v8::Persistent::MakeWeak'
with
[
T=v8::Value
]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Administrator\AppData\Roamin
g\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\nw-gyp\bin\nw-gyp.js" "--arch=ia32" "rebuild" "--target=0.7.0"
gyp ERR! cwd C:\npmpak\node_modules\ffi\node_modules\ref
gyp ERR! node -v v0.10.11
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok

Error:The specified module could not be found.

node hello.js

module.js:356
Module._extensions[extension](this, filename);
^
Error: The specified module could not be found.
D:\nodejs\1_hello_world\build\Release\hello.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (D:\nodejs\1_hello_world\hello.js:1:75)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

win7 64bit
vs2012
nodejs v0.10.24

what is wrong with configure?

B:\nw-v0_3_4\myapp>npm i -g nw-gyp
...
C:\Users\User\AppData\Roaming\npm\nw-gyp -> C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js
[email protected] C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

B:\nw-v0_3_4\myapp>nw-gyp configure --target=0.3.4
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\Users\User.nw-gyp\0.3.4\tools\gyp\gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'B:\nw-v0_3_4\myapp\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\User.nw-gyp\0.3.4\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\User.nw-gyp\0.3.4',
gyp info spawn args '-Dmodule_root_dir=B:\nw-v0_3_4\myapp',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'B:\nw-v0_3_4\myapp\build',
gyp info spawn args '-Goutput_dir=.' ]
Traceback (most recent call last):
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\gyp", line 18, in
sys.exit(gyp.main(sys.argv[1:]))
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp__init__.py", line 511, in main
return gyp_main(args)
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp__init__.py", line 494, in gyp_main
options.circular_check)
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp__init__.py", line 133, in Load
depth, generator_input_info, check, circular_check)
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp\input.py", line 2378, in Load
depth, check)
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp\input.py", line 358, in LoadTargetBuildFile
includes, True, check)
File "C:\Users\User.nw-gyp\0.3.4\tools\gyp\pylib\gyp\input.py", line 208, in LoadOneBuildFile
raise Exception("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
Exception: binding.gyp not found (cwd: B:\nw-v0_3_4\myapp) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp\lib\configure.js:398:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\User\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js" "configure" "--target=0.3.4"
gyp ERR! cwd B:\nw-v0_3_4\myapp
gyp ERR! node -v v0.8.12
gyp ERR! nw-gyp -v v0.7.3-3
gyp ERR! not ok

`MakeWeak(void* parameters, WeakReferenceCallback callback);` not in v8.h

Hello

I try to compile edge.js for node-webkit with nw-gyp. I got a compile error, and fount the reason in the clrfunc.cpp of edge.js:

Handle<v8::Function> ClrFunc::Initialize(System::Func<System::Object^,Task<System::Object^>^>^ func)
{
    DBG("ClrFunc::Initialize Func<object,Task<object>> wrapper");

    HandleScope scope;

    ClrFunc^ app = gcnew ClrFunc();
    app->func = func;
    ClrFuncWrap* wrap = new ClrFuncWrap;
    wrap->clrFunc = app;    
    v8::Persistent<v8::Function> funcProxy = v8::Persistent<v8::Function>::New(
        FunctionTemplate::New(clrFuncProxy)->GetFunction());
    funcProxy->Set(v8::String::NewSymbol("_edgeContext"), v8::External::New((void*)wrap));
    funcProxy.MakeWeak((void*)wrap, clrFuncProxyNearDeath);
    return scope.Close(funcProxy);
}

The Problem is the funcProxy.MakeWeak((void*)wrap, clrFuncProxyNearDeath);. I was not sure, if this is a edge.js or node-webkit or nw-gyp problem, but then I investigates into the used v8.h files.

It looks like the line inline void MakeWeak(void* parameters, WeakReferenceCallback callback); is missing in the v8.h file used by nw-gyp for node-webkit 0.7.5.

So why is there this Problem, and how can I fix this?

Thanks for help.

Module version mismatch

I'm having trouble getting node-hid to work inside of node-webkit. cd node_modules/node-hid && ../../node_modules/.bin/nw-gyp rebuild --target=0.8.0 finishes 'ok' (with some warnings) but when I load in nw I get:

Error: Module version mismatch. Expected 13, got 11.
    at Module.load (module.js:352:32)
    at Function.Module._load (module.js:308:12)
    at Module.require (module.js:360:17)
    at require (module.js:376:17)
    at Object.eval (/private/var/folders/h_/123def456/T/.org.chromium.Chromium.Nw8DHr/node_modules/node-hid/index.js:5:15)
    at Module._compile (module.js:452:26)
    at Object.Module._extensions..js (module.js:470:10)
    at Module.load (module.js:352:32)
    at Function.Module._load (module.js:308:12)
    at Module.require (module.js:360:17)

I've tried a few different --target settings but 0.10.25 doesn't seem to work and anything lower (e.g. --target=0.6.0) gets the same error. Any advice?

Using nw-gyp with a custom built version of node-webkit for OS X Snow Leopard (10.6.8)

Hi I have a question about using nw-gyp to install the serialport module in particular for a version of node-webkit built for OS X Snow Leopard (10.6.8). I've built node-webkit (0.3.7) from source after reading about incompatibility of the pre-built binaries with 10.6.8, and then installed nw-gyp to install the native serialport module, but this doesn't appear to work as trying to require the serialport module now causes my NW app to crash (everything else works fine if I don't require the module). When running nw-gy to install serialport, I get 'OK' logs back, so the dependency is installing but it looks like it's still not working... any ideas on what can be done? Thanks so much.

can not rebuild node module sqlite3 on windows 8.1 enterprise

WINDOWS 8.1 enterprise chinese
node-webkit 0.9.2
python 2.7.6
VS 2013

ERROR INFO:

      d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\statement.

h(74) : 参见“node_sqlite3::Statement”的声明
..\src\database.cc(208): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(476): error C2227: “->Set”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(208): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\statement.cc(478): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1
个参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite
3.
vcxproj]
..\src\statement.cc(478): error C2466: 不能分配常量大小为 0 的数组 [D:\my\Servic
eOnline\Ser
viceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(478): error C2440: “初始化”: 无法从“int”转换为“v8::Loca
lv8::Value”
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcx
proj]
无构造函数可以接受源类型,或构造函数重载决策不明确
..\src\statement.cc(479): error C2039: “handle_”: 不是“node_sqlite3::Statemen
t”的成
员 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vc

xproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\statement.
h(74) : 参见“node_sqlite3::Statement”的声明
..\src\statement.cc(488): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:
my\ServiceO
nline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(250): error C3861: “NODE_PSYMBOL”: 找不到标识符 [D:\my\Ser
viceOnl
ine\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(488): error C2065: “Unwrap”: 未声明的标识符 [D:\my\Service
Online\S
erviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(488): error C2275: “node_sqlite3::Statement”: 将此类型用作
表达式非法 [
D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxpr
oj]
..\src\database.cc(257): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1 个
参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.
v
cxproj]
..\src\database.cc(262): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(266): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(266): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(266): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(271): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\statement.cc(550): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1
个参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite
3.
vcxproj]
..\src\database.cc(271): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(271): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(551): error C2039: “handle_”: 不是“node_sqlite3::Statemen
t”的成
员 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vc

xproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\statement.
h(74) : 参见“node_sqlite3::Statement”的声明
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\statement.cc(556): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1
个参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite
3.
vcxproj]
..\src\database.cc(280): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(557): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1
个参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite
3.
vcxproj]
..\src\database.cc(280): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(558): fatal error C1903: 无法从以前的错误中恢复;正在停止编
译 [D:\my\ServiceO
nline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(280): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(298): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(298): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(298): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(316): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(316): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(316): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(396): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(396): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(396): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(434): warning C4244: “参数”: 从“double”转换到“int32_t”
,可能丢失数据 [D:
my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(436): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(436): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(436): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(479): warning C4244: “参数”: 从“sqlite3_int64”转换到“int
32_t”,可能丢失
数据 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.
v
cxproj]
..\src\database.cc(481): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(481): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(481): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(487): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(487): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(487): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(533): error C3861: “NODE_PSYMBOL”: 找不到标识符 [D:\my\Ser
viceOnl
ine\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(537): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(541): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(541): error C2227: “->Get”的左边必须指向类/结构/联合/泛型类
型 [D:\my\Service
Online\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(541): error C2227: “->Call”的左边必须指向类/结构/联合/泛型
类型 [D:\my\Servic
eOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(545): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1 个
参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.
v
cxproj]
..\src\database.cc(545): error C2466: 不能分配常量大小为 0 的数组 [D:\my\Service
Online\Serv
iceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(545): error C2440: “初始化”: 无法从“int”转换为“v8::Local
v8::Value”
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
无构造函数可以接受源类型,或构造函数重载决策不明确
..\src\database.cc(546): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(556): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(556): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(556): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(575): error C2661: “v8::Localv8::Value::New”: 没有重载函
数接受 1 个
参数 [D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.
v
cxproj]
..\src\database.cc(575): error C2466: 不能分配常量大小为 0 的数组 [D:\my\Service
Online\Serv
iceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(575): error C2440: “初始化”: 无法从“int”转换为“v8::Local
v8::Value”
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
无构造函数可以接受源类型,或构造函数重载决策不明确
..\src\database.cc(576): error C2039: “handle_”: 不是“node_sqlite3::Database
”的成员
[D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxp
roj]
d:\my\serviceonline\serviceonline\node_modules\sqlite3\src\database.h
(20) : 参见“node_sqlite3::Database”的声明
..\src\database.cc(586): error C2653: “ObjectWrap”: 不是类或命名空间名称 [D:\m
y\ServiceOn
line\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(586): error C2065: “Unwrap”: 未声明的标识符 [D:\my\ServiceO
nline\Se
rviceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\database.cc(586): error C2275: “node_sqlite3::Database”: 将此类型用作表
达式非法 [D:
\my\ServiceOnline\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj
]
..\src\database.cc(586): fatal error C1003: 错误计数超过 100;正在停止编译 [D:\m
y\ServiceOnl
ine\ServiceOnline\node_modules\sqlite3\build\node_sqlite3.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Administrator\AppData\Roamin
g\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\Users\Administrator\AppData\Roaming\npm\node_m
odules\nw-gyp\bin\nw-gyp.js" "rebuild" "--target=0.9.2"
gyp ERR! cwd D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3
gyp ERR! node -v v0.10.25
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok

D:\my\ServiceOnline\ServiceOnline\node_modules\sqlite3>

Configure error

Hi, I'm trying to use nw-gyp to build the serialport module for Windows 7. I followed the directions listed here https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp but get errors at the configure stage. I am running Node v0.8.17 and NW v0.4.0. I noticed that in the other configure issue listed, you mention that nw-gyp should be run from the modules dir, which I am doing but still getting errors. My log message listed below, thanks for all your help.

C:\Users\eric\Documents\GitHub\drawduino\app\node_modules>nw-gyp configure --tar
get=0.4.0
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\Users\eric.nw-gyp\0.4.0\tools\gyp\gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\eric\Documents\GitHub\drawduino\app\node_
modules\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\eric\AppData\Roaming\npm\node_modules\nw-
gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\eric.nw-gyp\0.4.0\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\eric.nw-gyp\0.4.0',
gyp info spawn args '-Dmodule_root_dir=C:\Users\eric\Documents\GitHub\dra
wduino\app\node_modules',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\eric\Documents\GitHub\drawduino\app\node_
modules\build',
gyp info spawn args '-Goutput_dir=.' ]
Traceback (most recent call last):
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\gyp", line 18, in
sys.exit(gyp.main(sys.argv[1:]))
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp__init__.py", line 511,
in main
return gyp_main(args)
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp__init__.py", line 494,
in gyp_main
options.circular_check)
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp__init__.py", line 133,
in Load
depth, generator_input_info, check, circular_check)
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp\input.py", line 2378, in
Load
depth, check)
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp\input.py", line 358, in
LoadTargetBuildFile
includes, True, check)
File "C:\Users\eric.nw-gyp\0.4.0\tools\gyp\pylib\gyp\input.py", line 208, in
LoadOneBuildFile
raise Exception("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
Exception: binding.gyp not found (cwd: C:\Users\eric\Documents\GitHub\drawduino
app\node_modules) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\eric\AppData\Roaming\npm\n
ode_modules\nw-gyp\lib\configure.js:398:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7600
gyp ERR! command "node" "C:\Users\eric\AppData\Roaming\npm\node_modules\n
w-gyp\bin\nw-gyp.js" "configure" "--target=0.4.0"
gyp ERR! cwd C:\Users\eric\Documents\GitHub\drawduino\app\node_modules
gyp ERR! node -v v0.8.17
gyp ERR! nw-gyp -v v0.7.3-3
gyp ERR! not ok

Error: 404 status code downloading tarball (nw-headers...)

Here is the complete STR and results:

rwaldron at nova in ~/clonez/servo-ui/node_modules/serialport on master*
$ nw-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp http GET http://node-webkit.s3.amazonaws.com/v0.10.22/nw-headers-v0.10.22.tar.gz
gyp http 404 http://node-webkit.s3.amazonaws.com/v0.10.22/nw-headers-v0.10.22.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/nw-gyp/lib/install.js:223:14)
gyp ERR! stack     at Request.EventEmitter.emit (events.js:117:20)
gyp ERR! stack     at Request.onResponse (/usr/local/lib/node_modules/nw-gyp/node_modules/request/request.js:832:10)
gyp ERR! stack     at ClientRequest.g (events.js:175:14)
gyp ERR! stack     at ClientRequest.EventEmitter.emit (events.js:95:17)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (http.js:1688:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
gyp ERR! stack     at Socket.socketOnData (http.js:1583:20)
gyp ERR! stack     at TCP.onread (net.js:525:27)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild"
gyp ERR! cwd /Users/rwaldron/clonez/servo-ui/node_modules/serialport
gyp ERR! node -v v0.10.22
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok

building ursa on 0.8.6

I am using nw-gyp rebuild --target=0.8.6 to try and build ursa which is successful with the following output:

nw-gyp rebuild --target=0.8.6
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\pyarm_000\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Code\\Dota2ReplayManager\\node_modules\\steam\\node_modules\\ursa\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\pyarm_000\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\pyarm_000\\.nw-gyp\\0.8.6\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\pyarm_000\\.nw-gyp\\0.8.6',
gyp info spawn args   '-Dmodule_root_dir=D:\\Code\\Dota2ReplayManager\\node_modules\\steam\\node_modules\\ursa',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\Code\\Dota2ReplayManager\\node_modules\\steam\\node_modules\\ursa\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn msbuild
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=Win32' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  asprintf.cc
  ursaNative.cc
d:\code\dota2replaymanager\node_modules\steam\node_modules\ursa\src\ursaNative.h(6): warning C4005: 'BUILDING_NODE_EXTE
NSION' : macro redefinition (..\src\ursaNative.cc) [D:\Code\Dota2ReplayManager\node_modules\steam\node_modules\ursa\bui
ld\ursaNative.vcxproj]
          command-line arguments :  see previous definition of 'BUILDING_NODE_EXTENSION'
..\src\ursaNative.cc(41): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayManag
er\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(379): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(387): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(388): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(389): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(390): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(391): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(392): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(393): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(394): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(395): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(396): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(397): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(398): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
..\src\ursaNative.cc(399): warning C4996: 'v8::FunctionTemplate::New': was declared deprecated [D:\Code\Dota2ReplayMana
ger\node_modules\steam\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(3343) : see declaration of 'v8::FunctionTemplate::New'
C:\Users\pyarm_000\.nw-gyp\0.8.6\deps\v8\include\v8.h(261): warning C4506: no definition for inline function 'v8::Persi
stent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\Code\Dota2ReplayManager\node_modules\steam\node_modules\ursa\build\
ursaNative.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\ursaNative.cc)
     Creating library D:\Code\Dota2ReplayManager\node_modules\steam\node_modules\ursa\build\Release\ursaNative.lib and
  object D:\Code\Dota2ReplayManager\node_modules\steam\node_modules\ursa\build\Release\ursaNative.exp
  Generating code
  Finished generating code
  ursaNative.vcxproj -> D:\Code\Dota2ReplayManager\node_modules\steam\node_modules\ursa\build\Release\\ursaNative.node
gyp info ok

However when I try using it in my app I still get an error with the following stack:

[  
      "Error: %1 is not a valid Win32 application.\r",
      "D:\\Code\\Dota2ReplayManager\\node_modules\\steam\\node_modules\\ursa\\bin\\ursaNative.node",
      "    at Module.load (module.js:359:32)",
      "    at Function.Module._load (module.js:315:12)",
      "    at Module.require (module.js:367:17)",
      "    at require (module.js:383:17)",
      "    at Object.eval (D:\\Code\\Dota2ReplayManager\\node_modules\\steam\\node_modules\\ursa\\lib\\ursa.js:18:18)",
      "    at Module._compile (module.js:459:26)",
      "    at Object.Module._extensions..js (module.js:477:10)",
      "    at Module.load (module.js:359:32)",
      "    at Function.Module._load (module.js:315:12)",
      "    at Module.require (module.js:367:17)"
]

I've created other native modules the exact same way but this ursa module is giving me issues.
If anyone could shed a light on this I would greatly appreciate it as this ursa module is the final hurdle for my app.

Thank you

Please update gyp to add support for visual studio 2013..

Hi. First of all, sorry for my bad English.. Since I want to use 3rd party modules with c/c++ addons, I ran nw-gyp rebuild --target=0.8.0 to rebuild my module for node-webkit. However, after typing that command, I just got this error message :

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of t he component to the system path if it is installed elsewhere.

It seems that this issue occured because there is no VCBuild.exe in visual studio 2013 anymore. Is there anyway to solve this problem?

ENOENT on Windows 7 64bits

I tried to make it output more information, but that's the maximum I'm getting. I'm trying to rebuild edge.js using nw-gyp and getting that undescriptive error with no clues.

C:\Inetpub\ID\client\node_modules\edge>nw-gyp configure --target=0.8.4 --verbose
gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli   'F:\\Users\\Paulo\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--target=0.8.4',
gyp verb cli   '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Python" in the PATH
gyp verb `which` succeeded for `%s` C:\Python C:\Python
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "F:\\Users\\Paulo\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "configure" "--target=0.8.4" "--verbose"
gyp ERR! cwd C:\Inetpub\ID\client\node_modules\edge
gyp ERR! node -v v0.10.22
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok

What else is there?

Fibers, when compiled by nw-gyp, crashes node-webkit

Fibers won't build for nw > 0.6.3 (because it can't find a proper makeWeak method template) but it builds for 0.6.3.

Modify fibers.js to look for fibers.node in the correct place and attempt to require it from the developer tools console, like so:

require('./node_modules/fibers/fibers')

and node-webkit closes itself without displaying an error. Any ideas?

I cann't use nw-gyp to compile the node-images

I want to use node-images in node-webkit, but the compiler syntax error.

node-images:https://github.com/zhangyuanwei/node-images

D:\node_modules\node-images>nw-gyp clean
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info ok

D:\node_modules\node-images>nw-gyp --configure --target=0.9.2

Usage: nw-gyp [options]

where is one of:
- build - Invokes msbuild and builds the module
- clean - Removes any generated build files and the "out" dir
- configure - Generates MSVC project files for the current module
- rebuild - Runs "clean", "configure" and "build" all at once
- install - Install node development files for the specified node version.
- list - Prints a listing of the currently installed node development files
- remove - Removes the node development files for the specified version

for specific command usage and options try:
$ nw-gyp --help

[email protected] C:\Users\IVY\AppData\Roaming\npm\node_modules\nw-gyp
[email protected]

D:\node_modules\node-images>nw-gyp rebuild --targer=0.9.2

......

v8::Persistent”转换为“v8::Handle” [D:\node_modules\node-images\build\bi
nding
.vcxproj]
with
[
T=v8::FunctionTemplate
]
没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
..\src\Image.cc(64): error C2664: “v8::ObjectTemplate::SetAccessor”: 不能将参
数 2 从“
v8::Handle (__cdecl *)(v8::Localv8::String,const int)”转换为“v8::Accessor
Gett
erCallback” [D:\node_modules\node-images\build\binding.vcxproj]
with
[
T=v8::Value
]
UDT 返回值的不兼容调用约定
..\src\Image.cc(65): error C2664: “v8::ObjectTemplate::SetAccessor”: 不能将参
数 2 从“
v8::Handle (__cdecl *)(v8::Localv8::String,const int)”转换为“v8::Accessor
Gett
erCallback” [D:\node_modules\node-images\build\binding.vcxproj]
with
[
T=v8::Value
]
UDT 返回值的不兼容调用约定
..\src\Image.cc(66): error C2664: “v8::ObjectTemplate::SetAccessor”: 不能将参
数 2 从“
v8::Handle (__cdecl *)(v8::Localv8::String,const int)”转换为“v8::Accessor
Gett
erCallback” [D:\node_modules\node-images\build\binding.vcxproj]
with
[
T=v8::Value
]
UDT 返回值的不兼容调用约定
..\src\Image.cc(74): error C2664: “v8::Object::SetAccessor”: 不能将参数 2 从“
v8::Hand
le (__cdecl *)(v8::Localv8::String,const int)”转换为“v8::AccessorGetterCa
llba
ck” [D:\node_modules\node-images\build\binding.vcxproj]
with
[
T=v8::Value
]
UDT 返回值的不兼容调用约定
..\src\Image.cc(75): error C2664: “v8::Object::SetAccessor”: 不能将参数 2 从“
v8::Hand
le (_cdecl *)(v8::Localv8::String,const int)”转换为“v8::AccessorGetterCa
llba
ck” [D:\node_modules\node-images\build\binding.vcxproj]
with
[
T=v8::Value
]
UDT 返回值的不兼容调用约定
..\src\Image.cc(95): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node

modules\node-images\build\binding.vcxproj]
..\src\Image.cc(95): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node_m
odules\node-i
mages\build\binding.vcxproj]
..\src\Image.cc(100): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(100): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(105): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(105): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(110): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(110): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(136): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(136): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(138): error C2065: “info”: 未声明的标识符 [D:\node_modules\nod
e-images
\build\binding.vcxproj]
..\src\Image.cc(138): error C2228: “.This”的左边必须有类/结构/联合 [D:\node_mo
dules\node-i
mages\build\binding.vcxproj]
类型是“'unknown-type'”
..\src\Image.cc(142): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(142): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(144): error C2065: “info”: 未声明的标识符 [D:\node_modules\nod
e-images
\build\binding.vcxproj]
..\src\Image.cc(144): error C2228: “.This”的左边必须有类/结构/联合 [D:\node_mo
dules\node-i
mages\build\binding.vcxproj]
类型是“'unknown-type'”
..\src\Image.cc(149): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(149): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(151): error C2065: “info”: 未声明的标识符 [D:\node_modules\nod
e-images
\build\binding.vcxproj]
..\src\Image.cc(151): error C2228: “.This”的左边必须有类/结构/联合 [D:\node_mo
dules\node-i
mages\build\binding.vcxproj]
类型是“'unknown-type'”
..\src\Image.cc(155): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(155): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(157): error C2065: “info”: 未声明的标识符 [D:\node_modules\nod
e-images
\build\binding.vcxproj]
..\src\Image.cc(157): error C2228: “.This”的左边必须有类/结构/联合 [D:\node_mo
dules\node-i
mages\build\binding.vcxproj]
类型是“'unknown-type'”
..\src\Image.cc(182): warning C4244: “参数”: 从“double”转换到“size_t”,可
能丢失数据 [D:\node
_modules\node-images\build\binding.vcxproj]
..\src\Image.cc(182): warning C4244: “参数”: 从“double”转换到“size_t”,可
能丢失数据 [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(189): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持
默认 int [D:\node
modules\node-images\build\binding.vcxproj]
..\src\Image.cc(189): error C2143: 语法错误 : 缺少“,”(在“&”的前面) [D:\node

modules\node-
images\build\binding.vcxproj]
..\src\Image.cc(191): error C2065: “info”: 未声明的标识符 [D:\node_modules\nod
e-images
\build\binding.vcxproj]
..\src\Image.cc(191): error C2228: “.This”的左边必须有类/结构/联合 [D:\node_mo
dules\node-i
mages\build\binding.vcxproj]
类型是“'unknown-type'”
..\src\Image.cc(342): error C2882: “Buffer”: 在表达式中非法使用命名空间标识符
[D:\node_modules
node-images\build\binding.vcxproj]
..\src\Image.cc(342): error C2065: “buffer”: 未声明的标识符 [D:\node_modules\n
ode-imag
es\build\binding.vcxproj]
..\src\Image.cc(373): error C2065: “buffer”: 未声明的标识符 [D:\node_modules\n
ode-imag
es\build\binding.vcxproj]
..\src\Image.cc(374): error C2065: “buffer”: 未声明的标识符 [D:\node_modules\n
ode-imag
es\build\binding.vcxproj]
..\src\Image.cc(376): error C2065: “buffer”: 未声明的标识符 [D:\node_modules\n
ode-imag
es\build\binding.vcxproj]
..\src\Image.cc(376): error C2227: “->handle
”的左边必须指向类/结构/联合/泛型
类型 [D:\node_modu
les\node-images\build\binding.vcxproj]
类型是“'unknown-type'”
d:\node_modules\node-images\src\Image.h(134): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(134): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(135): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(135): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(136): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(136): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(137): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(137): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(143): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(143): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(144): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(144): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(145): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(145): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(146): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(146): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(147): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(147): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(134): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(134): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(135): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(135): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(136): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(136): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(137): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(137): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(143): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(143): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(144): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(144): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(145): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(145): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(146): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(146): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(147): error C4430: 缺少类型说明符 - 假定
为 int。注意
: C++ 不支持默认 int [D:\node_modules\node-images\build\binding.vcxproj]
d:\node_modules\node-images\src\Image.h(147): error C2143: 语法错误 : 缺少“,”(
在“&”的前面
) [D:\node_modules\node-images\build\binding.vcxproj]
..\src\Resize.cc(17): warning C4244: “初始化”: 从“size_t”转换到“float”,可
能丢失数据 [D:\node
_modules\node-images\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\IVY\AppData\Roaming\npm\node
_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\IVY\AppData\Roaming\npm\node_modules\nw
-gyp\bin\nw-gyp.js" "rebuild" "--target=0.9.2"
gyp ERR! cwd D:\node_modules\node-images
gyp ERR! node -v v0.10.26
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok

gyp should add %(AdditionalDependencies) to *.vcproj files to avoid unexpected lnk2001 error

1>------ 已启动生成: 项目: serialport, 配置: Release Win32 ------
1>生成启动时间为 2013/5/23 14:41:21。
1>InitializeBuildStatus:
1> 正在对“Release\obj\serialport\serialport.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
1> serialport.cpp
1> serialport_unix.cpp
1> serialport_win.cpp
1> enumser.cpp
1>..\src\win\enumser.cpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: 使用了 C++ 异常处理程序,但未启用展开语义。请指定 /EHsc
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: 使用了 C++ 异常处理程序,但未启用展开语义。请指定 /EHsc
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: 使用了 C++ 异常处理程序,但未启用展开语义。请指定 /EHsc
1> disphelper.c
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) 与 Linker 的 OutputFile 属性值(.node)不匹配。这可能导致项目生成不正确。若要更正此问题,请确保 $(OutDir)、$(TargetName) 和 $(TargetExt) 属性值与 %(Link.OutputFile) 中指定的值匹配。
1>Link:
1> 正在创建库 D:\nodejs\node_modules\serialport\build\Release\serialport.lib 和对象 D:\nodejs\node_modules\serialport\build\Release\serialport.exp
1>enumser.obj : error LNK2001: 无法解析的外部符号 _EnumPortsA@24
1>D:\nodejs\node_modules\serialport\build\Release\serialport.node : fatal error LNK1120: 1 个无法解析的外部命令
1>
1>生成失败。
1>
1>已用时间 00:00:01.07
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

“fatal error C1083” — Problems with installing SQLite module

Hello!
I want to use sqlite3 in my node-webkit app, so I tried to install it, but got this:

path-to-nw-project
> npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.10.5 --python=C:\Python\27\python.exe --msvs_version=2013

npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
-
> [email protected] install path-to-nw-project\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build

Сборка проектов в этом решении по одному. Чтобы включить параллельную сборку, добавьте параметр "/m".
  unpack_sqlite_dep
  sqlite3.c
  sqlite3.vcxproj -> path-to-nw-project\node_modules\sqlite3\build\Release\\sqlite3.lib
  database.cc
  node_sqlite3.cc
..\src\node_sqlite3.cc(1): fatal error C1083: Cannot open include file: node.h: No such file or directory [path-to-nw-project\node_modules\sqlite3\build\node_sqlite3.vcxproj]
  statement.cc
..\src\database.cc(2): fatal error C1083: Cannot open include file: node.h: No such file or directory
 [path-to-nw-project\node_modules\sqlite3\build\node_sqlite3.vcxproj]
..\src\statement.cc(2): fatal error C1083: Cannot open include file: node.h: No such file or directory [path-to-nw-project\node_modules\sqlite3\build\node_sqlite3.vcxproj]

Google has not given any proper solutions :(
I have Node-Webkit 0.10.5, VisualStudio Express 2013, and Python 2.7.6 (but as secondary, it isn't in PATH env. variable, so I passed --python argument).

Problem while configure on windows 7

I try to run following command on my windows 7

nw-gyp configure --target=0.10.2

but i am getting some warnings, which in turn causing errors while build

C:\edge>nw-gyp configure --target=0.10.2
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'C:\\nodist\\bin\\node_modules\\nw-gyp\\gyp\\gyp_main.py',

gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\edge\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\nodist\\bin\\node_modules\\nw-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\neo\\.nw-gyp\\0.10.2\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\neo\\.nw-gyp\\0.10.2',
gyp info spawn args   '-Dmodule_root_dir=C:\\edge',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\edge\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Warning: while converting VCCLCompilerTool/RuntimeLibrary to MSBuild, index valu
e (-1) not in expected range [0, 4)
Warning: while converting VCCLCompilerTool/RuntimeTypeInfo to MSBuild, expected
bool; got '-1'
Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to MSBuild, index
value (-1) not in expected range [0, 4)
Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to MSBuild, index
value (-1) not in expected range [0, 4)
Warning: while converting VCCLCompilerTool/RuntimeLibrary to MSBuild, index valu
e (-1) not in expected range [0, 4)
Warning: while converting VCCLCompilerTool/RuntimeTypeInfo to MSBuild, expected
bool; got '-1'
gyp info ok

Cannot build the ref module for node-webkit 0.8.0

I'm not able to build the ref used by node-ffi for node-webkit 0.8.0.

epeli@esandesktoplaptop ~/tmp/nw-ffi/node_modules/ffi/node_modules/ref
$ node -v
v0.10.18
epeli@esandesktoplaptop ~/tmp/nw-ffi/node_modules/ffi/node_modules/ref
$ ../../../.bin/nw-gyp -v
v0.10.9
epeli@esandesktoplaptop ~/tmp/nw-ffi/node_modules/ffi/node_modules/ref
$ ../../../.bin/nw-gyp configure --target=0.8.0                                                                                                                                                                                                                                 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn python
gyp info spawn args [ '/home/epeli/tmp/nw-ffi/node_modules/nw-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/epeli/tmp/nw-ffi/node_modules/ffi/node_modules/ref/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/epeli/tmp/nw-ffi/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/epeli/.nw-gyp/0.8.0/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/epeli/.nw-gyp/0.8.0',
gyp info spawn args   '-Dmodule_root_dir=/home/epeli/tmp/nw-ffi/node_modules/ffi/node_modules/ref',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok 
epeli@esandesktoplaptop ~/tmp/nw-ffi/node_modules/ffi/node_modules/ref
$ ../../../.bin/nw-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/epeli/tmp/nw-ffi/node_modules/ffi/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc: In function 'v8::Handle<v8::Value> {anonymous}::WriteObject(const v8::Arguments&)':
../src/binding.cc:189:37: error: no matching function for call to 'v8::Persistent<v8::Value>::MakeWeak(NULL, void (&)(v8::Persistent<v8::Value>, void*))'
../src/binding.cc:189:37: note: candidates are:
In file included from ../src/binding.cc:5:0:
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:639:3: note: template<class S, class P> void v8::Persistent::MakeWeak(P*, typename v8::WeakReferenceCallbacks<S, P>::Revivable) [with S = S; P = P; T = v8::Value]
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:639:3: note:   template argument deduction/substitution failed:
../src/binding.cc:189:37: note:   mismatched types 'P*' and 'int'
In file included from ../src/binding.cc:5:0:
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:644:3: note: template<class P> void v8::Persistent::MakeWeak(P*, typename v8::WeakReferenceCallbacks<T, P>::Revivable) [with P = P; T = v8::Value]
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:644:3: note:   template argument deduction/substitution failed:
../src/binding.cc:189:37: note:   mismatched types 'P*' and 'int'
In file included from ../src/binding.cc:5:0:
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:649:3: note: template<class S, class P> void v8::Persistent::MakeWeak(v8::Isolate*, P*, typename v8::WeakReferenceCallbacks<S, P>::Revivable) [with S = S; P = P; T = v8::Value]
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:649:3: note:   template argument deduction/substitution failed:
../src/binding.cc:189:37: note:   candidate expects 3 arguments, 2 provided
In file included from ../src/binding.cc:5:0:
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:5745:6: note: template<class P> void v8::Persistent::MakeWeak(v8::Isolate*, P*, typename v8::WeakReferenceCallbacks<T, P>::Revivable) [with P = P; T = v8::Value]
/home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:5745:6: note:   template argument deduction/substitution failed:
../src/binding.cc:189:37: note:   candidate expects 3 arguments, 2 provided
In file included from ../src/binding.cc:6:0:
/home/epeli/.nw-gyp/0.8.0/src/node.h: In instantiation of 'void node::SetMethod(target_t, const char*, v8::InvocationCallback) [with target_t = v8::Handle<v8::Object>; v8::InvocationCallback = v8::Handle<v8::Value> (*)(const v8::Arguments&)]':
../src/binding.cc:641:45:   required from here
/home/epeli/.nw-gyp/0.8.0/src/node.h:123:5: warning: 'static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)' is deprecated (declared at /home/epeli/.nw-gyp/0.8.0/deps/v8/include/v8.h:3334) [-Wdeprecated-declarations]
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory `/home/epeli/tmp/nw-ffi/node_modules/ffi/node_modules/ref/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/epeli/tmp/nw-ffi/node_modules/nw-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.10.9.opinsys1
gyp ERR! command "node" "/home/epeli/tmp/nw-ffi/node_modules/.bin/nw-gyp" "build"
gyp ERR! cwd /home/epeli/tmp/nw-ffi/node_modules/ffi/node_modules/ref
gyp ERR! node -v v0.10.18
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok 
epeli@esandesktoplaptop ~/tmp/nw-ffi/node_modules/ffi/node_modules/ref
$ 

--target=0.6.0 works but anything later fails like above.

I'm on 32bit Ubuntu Quantal.

uv_async_t error when building addon

Hi-
When doing "nw-gyp rebuild --target=0.10.5" for an addon while it builds fine with node-gyp, I am getting the following error, can you kindly advise? Thanks

error C2664: 'uv_async_init' : cannot convert parameter 3 from 'void (__cdecl *)(uv_async_t *)' to 'uv_async_cb'

Versions of relevant:
node -v v0.11.13
nw-gyp -v v0.12.4

Issue compiling module on windows XP

Hi,

I spent the better part of a day debugging why i was getting this error:

LINK : fatal error LNK1181: cannot open input file 'C:\Documents.obj'
Project : warning PRJ0018: The following environment variables were not found:

I found the place where this is corrected. See resolution here:

nwjs/nw.js#2042

Uncaught Error: no error

Hi,

I have the next error when build the node webkit app:

Uncaught Error: no errorC:\Users\ADMINI~1\AppData\Local\Temp\nw4884_5297\node_modules\hello.node

I make a native addons for node.js, for now, its only an example of hello. I build this using nw-gyp and 0.8.6 version of node webkit

The wired of this, is when I test my app using "nw ." on my terminal, all works perfectly, the native module load perfectly without errors.

But when I build the application with grunt-node-webkit-build and the module crash with the above error.

Any suggestion?

Nw-gyp fails to rebuild on x64

I'm running windows 64 bit and trying to rebuild ursa module, its an openssl dependent module and nw-gyp seems to fail to detect openssl installation. I have it installed as C:\OpenSSL-Win64 by default. Any advice would be appreciated. Thanks

C:\Users\Luis Felipe\Nwebkit\node_modules\ursa>nw-gyp rebuild --target=0.7.3
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\Luis Felipe\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\gyp\\gyp
',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Luis Felipe\\Nwebkit\\node_modules\\ursa\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Luis Felipe\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\addon.gy
pi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Luis Felipe\\.nw-gyp\\0.7.3\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Luis Felipe\\.nw-gyp\\0.7.3',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Luis Felipe\\Nwebkit\\node_modules\\ursa',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\Luis Felipe\\Nwebkit\\node_modules\\ursa\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\windows\Microsoft.NET\Framework\v4.0.30319\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=Win32' ]
  asprintf.cc
  ursaNative.cc
c:\users\luis felipe\nwebkit\node_modules\ursa\src\ursaNative.h(6): warning C4005: 'BUILDING_NODE_E
XTENSION' : macro redefinition [C:\Users\Luis Felipe\Nwebkit\node_modules\ursa\build\ursaNative.vcx
proj]
          command-line arguments :  see previous definition of 'BUILDING_NODE_EXTENSION'
C:\Users\Luis Felipe\.nw-gyp\0.7.3\deps\v8\include\v8.h(41): warning C4005: 'V8_USE_UNSAFE_HANDLES'
 : macro redefinition [C:\Users\Luis Felipe\Nwebkit\node_modules\ursa\build\ursaNative.vcxproj]
          C:\Users\Luis Felipe\.nw-gyp\0.7.3\src\node.h(25) : see previous definition of 'V8_USE_UN
  SAFE_HANDLES'
c:\users\luis felipe\nwebkit\node_modules\ursa\src\ursaNative.h(10): fatal error C1083: Cannot open
 include file: 'openssl/rsa.h': No such file or directory [C:\Users\Luis Felipe\Nwebkit\node_module
s\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit c
ode: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Luis Felipe\AppData\Roaming\npm\node_modules\nw-
gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\Luis Felipe\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\n
w-gyp.js" "rebuild" "--target=0.7.3"
gyp ERR! cwd C:\Users\Luis Felipe\Nwebkit\node_modules\ursa
gyp ERR! node -v v0.10.18
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok

error 200 building nw-gyp

I try to build nw-app but I got this error : "UNCAUGHT EXCEPTION"

screenhunter_36 dec 08 15 41

For this app, the "node congifure" and the "node build" works fine.

Système : CentOS Linux

Thank you in advance for your help

Can not build module with nw 0.9.x

The same code which worked fine with node-webkit 0.8.4 now throws errors while building.

../main.cpp:43:31: error: expected class name
class MyClass : node::ObjectWrap {

Also, for a regular method setup to exports it throws an error as well:

Handle<Value> Method(const Arguments& args) {
    HandleScope scope;
    return scope.Close(String::New("Hey there"));
}
...
exports->Set(String::NewSymbol("Method"), FunctionTemplate::New(Method)->GetFunction());

Here is the error:

../main.cpp:300:66: error: cannot initialize a parameter of type 'FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') with an lvalue of type 'Handle<v8::Value> (const v8::Arguments &)':
      type mismatch at 1st parameter ('const FunctionCallbackInfo<v8::Value> &' vs 'const v8::Arguments &')
        exports->Set(String::NewSymbol("Method"), FunctionTemplate::New(Method)->GetFunction());

Once again, this code works just fine with node-webkit 0.8.4 and older.

Failing to get nw-headers

Trying to rebuild 'zerorpc' for node bit get the following errors.

$ nw-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp http GET http://node-webkit.s3.amazonaws.com/v0.10.26/nw-headers-v0.10.26.tar.gz
gyp http 404 http://node-webkit.s3.amazonaws.com/v0.10.26/nw-headers-v0.10.26.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack at Request. (/usr/local/lib/node_modules/nw-gyp/lib/install.js:234:14)
gyp ERR! stack at Request.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at Request.onResponse (/usr/local/lib/node_modules/nw-gyp/node_modules/request/request.js:917:10)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.EventEmitter.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient as onIncoming
gyp ERR! stack at HTTPParser.parserOnHeadersComplete as onHeadersComplete
gyp ERR! stack at Socket.socketOnData as ondata
gyp ERR! stack at TCP.onread (net.js:527:27)
gyp ERR! System Darwin 13.0.2
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild"
gyp ERR! cwd /node_modules/zerorpc
gyp ERR! node -v v0.10.26
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok

Regards,

Carl

node-odbc not building for node-webkit 0.9.x

I am able to build the module fine using node-gyp (targeting node 0.11), but when attempting to build for nw-gyp, I am presented with a long list of build errors. I am at latest versions of node-gyp and nw-gyp. My output is as follows:

C:\GitHub\AppNodeIntegration\turbo\node_modules\odbc>nw-gyp --target=0.9.2 re
build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_mod
ules\\nw-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\GitHub\\AppNodeIntegration\\turbo\\node_modules\\o
dbc\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\User\\AppData\\Roaming\\npm\\node_mod
ules\\nw-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\User\\.nw-gyp\\0.9.2\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\User\\.nw-gyp\\0.9.2'
,
gyp info spawn args   '-Dmodule_root_dir=C:\\GitHub\\AppNodeIntegration\\turb
o\\node_modules\\odbc',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\GitHub\\AppNodeIntegration\\turbo\\node_modules\\o
dbc\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn c:\Windows\Microsoft.NET\Framework\v4.0.30319\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=Win32' ]
  odbc_statement.cpp
c:\github\Appnodeintegration\turbo\node_modules\odbc\src\odbc.h(73): error C
2039: 'ObjectWrap' : is not a member of 'node' [C:\GitHub\AppNodeIntegration
\turbo\node_modules\odbc\build\odbc_bindings.vcxproj]
c:\github\Appnodeintegration\turbo\node_modules\odbc\src\odbc.h(73): error C
2504: 'ObjectWrap' : base class undefined [C:\GitHub\AppNodeIntegration\turb
o\node_modules\odbc\build\odbc_bindings.vcxproj]
c:\github\Appnodeintegration\turbo\node_modules\odbc\src\odbc_connection.h(2
1): error C2039: 'ObjectWrap' : is not a member of 'node' [C:\GitHub\AppNode
Integration\turbo\node_modules\odbc\build\odbc_bindings.vcxproj]

... and the build errors go on. I've only included the first few, as others likely stem from these. I can include the entire output if necessary.

This all worked fine for nw 0.8.x

Could someone please help diagnose the cause of these build errors?

nw-build

Did configure --target=0.3.3. But on build, getting:

 .nw-gyp/0.3.3/deps/uv/include/uv-private/ev.h:229:3: error: expected '}'
 EV_ERROR    = (-2147483647 - 1) /* sent when an error occurs */

Error rebuilding node-win32ole for node-webkit

I am running node and node-webkit on Windows7 32-bit. I have installed node-win32ole with npm and the module built successfully using my VS 2012 Desktop C++ installation. win32ole runs without any problems on node.

I have attempted to rebuild the module for nw without success. I also tried building for nw from a downloaded copy of the git repo but got the same errors. Here are some details of the problem.

The configure step is OK. The build step produces two identical errors one in each of two cc files (client.cc and v8variant.cc) The lines of code which produce the errors are essentially identical.

In client.cc :
OLE32core *oc = new OLE32core();
..... lines of code
Persistent objectDisposer = Persistent::New(thisObject);
objectDisposer.MakeWeak(oc, Dispose); //Error 2664 occurs here

In v8variant.cc :
OCVariant *ocv = new OCVariant();
... lines of code
Persistent objectDisposer = Persistent::New(thisObject);
objectDisposer.MakeWeak(ocv, Dispose); //Error 2664 occurs here

The text of the error is
error C2664: 'void v8::Persistent::MakeWeakole32core::OCVariant(P *,void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *))' : cannot convert parameter 2 from 'void (__cdecl *)(v8::Persistent,void *)' to 'void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *)'

I am no c++ expert but the Dispose argument I take to be a callback function which relates to the garbage collection of the object pointed to by the first argument

Presumably the type of the Dispose function is declared in the headers somewhere and I take it that the difference in building for node and building for node-webkit is essentially that you are using a different set of headers. Since it works with node that prompts the question, is there a problem with the way Dispose is declared in the nw headers?

How to compile 32-bit libraries on a 64-bit mac?

I compile node-sqlite3 with nw-gyp, but it cannot be loaded by node-webkit downloaded from here.

➜  src git:(master) ✗ file build/Release/node_sqlite3.node 
build/Release/node_sqlite3.node: Mach-O 64-bit dynamically linked shared library x86_64

Do I need to compile a 64-bit node-webkit binary?

Unable to build EJDB module for node-webkit v0.9.0-rc1

I'm not able to build the EJDB module for node-webkit v0.9.0-rc1 on ubuntu Quantal 32 bit.

harish@harish:~/Apps-dev/dbtest/node_modules/ejdb$ node -v
v0.10.25
harish@harish:~/Apps-dev/dbtest/node_modules/ejdb$ nw-gyp rebuild -c --target=0.9.0-rc1
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp info spawn python
gyp info spawn args [ '/home/harish/.nvm/v0.10.25/lib/node_modules/nw-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/harish/Apps-dev/dbtest/node_modules/ejdb/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/harish/.nvm/v0.10.25/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/harish/.nw-gyp/0.9.0-rc1/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/harish/.nw-gyp/0.9.0-rc1',
gyp info spawn args   '-Dmodule_root_dir=/home/harish/Apps-dev/dbtest/node_modules/ejdb',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/harish/Apps-dev/dbtest/node_modules/ejdb/build'
  CXX(target) Release/obj.target/ejdb_native/ejdb_native.o
In file included from ../ejdb_native.cc:20:0:
../ejdb/tcejdb/ejdb_private.h:81:5: warning: '$' in identifier or number [enabled by default]
../ejdb_native.cc:499:40: error: expected class-name before ‘{’ token
../ejdb_native.cc: In static member function ‘static v8::Handle ejdb::NodeEJDB::s_new_object(const v8::Arguments&)’:
../ejdb_native.cc:607:18: error: ‘class ejdb::NodeEJDB’ has no member named ‘Wrap’
../ejdb_native.cc: In static member function ‘static v8::Handle ejdb::NodeEJDB::s_close(const v8::Arguments&)’:
../ejdb_native.cc:628:29: error: ‘ObjectWrap’ has not been declared
../ejdb_native.cc:628:58: error: expected primary-expression before ‘>’ token
../ejdb_native.cc: In static member function ‘static v8::Handle ejdb::NodeEJDB::s_load(const v8::Arguments&)’:
../ejdb_native.cc:649:29: error: ‘ObjectWrap’ has not been declared
../ejdb_native.cc:649:58: error: expected primary-expression before ‘>’ token
../ejdb_native.cc: In static member function ‘static v8::Handle ejdb::NodeEJDB::s_remove(const v8::Arguments&)’:
../ejdb_native.cc:676:29: error: ‘ObjectWrap’ has not been declared
../ejdb_native.cc:676:58: error: expected primary-expression before ‘>’ token
../ejdb_native.cc: In static member function ‘static v8::Handle ejdb::NodeEJDB::s_save(const v8::Arguments&)’:
../ejdb_native.cc:717:36: error: no matching function for call to ‘v8::Object::Get(v8::Persistent >&)’
../ejdb_native.cc:717:36: note: candidates are:
In file included from ../ejdb_native.cc:17:0:

. . . . . . . 
 . . . . . . .

/home/harish/.nw-gyp/0.9.0-rc1/deps/v8/include/v8.h:557:5:   required from ‘v8::Persistent& v8::Persistent::operator=(const v8::Persistent&) [with T = v8::Function; M = v8::NonCopyablePersistentTraits; v8::Persistent = v8::Persistent >]’
../ejdb_cmd.h:75:13:   required from ‘ejdb::EIOCmdTask::EIOCmdTask(const v8::Handle&, T*, int, D*, void (*)(ejdb::EIOCmdTask*)) [with T = ejdb::NodeEJDB; D = ejdb::NodeEJDB::BSONCmdData]’
../ejdb_native.cc:652:102:   required from here
/home/harish/.nw-gyp/0.9.0-rc1/deps/v8/include/v8.h:481:5: error: cannot convert ‘v8::Primitive*’ to ‘v8::Object* volatile’ in assignment
make: *** [Release/obj.target/ejdb_native/ejdb_native.o] Error 1
make: Leaving directory `/home/harish/Apps-dev/dbtest/node_modules/ejdb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/harish/.nvm/v0.10.25/lib/node_modules/nw-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.5.0-17-generic
gyp ERR! command "node" "/home/harish/.nvm/v0.10.25/bin/nw-gyp" "rebuild" "-c" "--target=0.9.0-rc1"
gyp ERR! cwd /home/harish/Apps-dev/dbtest/node_modules/ejdb
gyp ERR! node -v v0.10.25
gyp ERR! nw-gyp -v v0.10.9
gyp ERR! not ok 

Works till node-webkit v0.8.4.

Edit

Now it fails with the nw new release(node-webkit v0.9.1) also.

Cannot build x86_64 module with nw-gyp

tl;dr;
I can't seem to change the architecture of a node module built with nw-gyp to x86_64, it always comes out as i386.


I've built node-webkit (0.10.1) as x86_64 (64 bit support recently added: nwjs/nw.js#296):

$ lipo -info node-webkit.app/Contents/MacOS/node-webkit 

Non-fat file: node-webkit.app/Contents/MacOS/node-webkit is architecture: x86_64

I am trying to build a node module as x86_64 with nw-gyp. I've been testing with the hello-world module (https://github.com/joyent/node/tree/master/test/addons/hello-world) but I've tried others as well. No matter what I do, it comes out as i386.

$ cd node_modules/hello-world
$ nw-gyp rebuild --arch=x86_64 --target=0.10.1 --verbose

gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli   '/usr/local/bin/nw-gyp',
gyp verb cli   'rebuild',
gyp verb cli   '--arch=x86_64',
gyp verb cli   '--target=0.10.1',
gyp verb cli   '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `python -c "import platform; print(platform.python_version());"` returned: "2.7.5\n"
gyp verb get node dir compiling against --target node version: 0.10.1
gyp verb command install [ '0.10.1' ]
gyp verb install input version string "0.10.1"
gyp verb installing legacy version? false
gyp verb install installing version: 0.10.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 0.10.1
gyp verb build dir attempting to create "build" dir: /Users/btj/projects/testapp/node_modules/hello-world/build
gyp verb build dir "build" dir needed to be created? /Users/btj/projects/testapp/node_modules/hello-world/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/btj/projects/testapp/node_modules/hello-world/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/btj/projects/testapp/node_modules/hello-world/config.gypi
gyp verb common.gypi checking for gypi file: /Users/btj/projects/testapp/node_modules/hello-world/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/nw-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/btj/projects/testapp/node_modules/hello-world/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/btj/.nw-gyp/0.10.1/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/btj/.nw-gyp/0.10.1',
gyp info spawn args   '-Dmodule_root_dir=/Users/btj/projects/testapp/node_modules/hello-world',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x86_64
gyp verb node dev dir /Users/btj/.nw-gyp/0.10.1
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
  c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/btj/.nw-gyp/0.10.1/src -I/Users/btj/.nw-gyp/0.10.1/deps/uv/include -I/Users/btj/.nw-gyp/0.10.1/deps/v8/include  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch i386 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/binding.o.d.raw  -c -o Release/obj.target/binding/binding.o ../binding.cc
  ./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch i386 -L./Release  -o Release/binding.node Release/obj.target/binding/binding.o -undefined dynamic_lookup
  SOLINK_MODULE(target) Release/binding.node: Finished
gyp info ok 

Build succeeds but the architecture is i386

$ lipo -info build/Release/binding.node 

Non-fat file: build/Release/binding.node is architecture: i386

If I try to run the i386 version I get this error (same error I get at runtime if I build my app with the i386 version):

$ node build/Release/binding.node 

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: dlopen(/Users/btj/projects/testapp/node_modules/hello-world/build/Release/binding.node, 1): no suitable image found.  Did find:
    /Users/btj/projects/testapp/node_modules/hello-world/build/Release/binding.node: mach-o, but wrong architecture
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

I'm probably missing something simple... Any ideas? Thanks!

gyp ERR! stack Error: `msbuild` failed with exit code: 1

The nw-gyp configure --target=0.10.5 works perfectly, but when I try nw-gyp build, doesnt work. This is the errors log:

C:\Users\Administrador\Documents\Project>nw-gyp build

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn msbuild
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=Win32' ]
Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar l
a compilación en paralelo, agregue el modificador "/m".
hello.cc
..\hello.cc(6): error C4430: missing type specifier - int assumed. Note: C++ do
es not support default-int [C:\Users\Administrador\Documents\Project\bu
ild\hello.vcxproj]
..\hello.cc(6): error C2143: syntax error : missing ',' before '&' [C:\Users\Ad
ministrador\Documents\Project\build\hello.vcxproj]
..\hello.cc(7): error C2248: 'v8::HandleScope::HandleScope' : cannot access pro
tected member declared in class 'v8::HandleScope' [C:\Users\Administrador\Docum
ents\Project\build\hello.vcxproj]
C:\Users\Administrador.nw-gyp\0.10.5\deps\v8\include\v8.h(845) : see
declaration of 'v8::HandleScope::HandleScope'
C:\Users\Administrador.nw-gyp\0.10.5\deps\v8\include\v8.h(829) : see
declaration of 'v8::HandleScope'
..\hello.cc(8): error C2039: 'Close' : is not a member of 'v8::HandleScope' [C:
\Users\Administrador\Documents\Project\build\hello.vcxproj]
C:\Users\Administrador.nw-gyp\0.10.5\deps\v8\include\v8.h(829) : see
declaration of 'v8::HandleScope'
..\hello.cc(8): error C2039: 'New' : is not a member of 'v8::String' [C:\Users
Administrador\Documents\Project\build\hello.vcxproj]
C:\Users\Administrador.nw-gyp\0.10.5\deps\v8\include\v8.h(1665) : se
e declaration of 'v8::String'
..\hello.cc(8): error C3861: 'New': identifier not found [C:\Users\Administrado
r\Documents\Project\build\hello.vcxproj]
..\hello.cc(12): error C2039: 'NewSymbol' : is not a member of 'v8::String' [C:
\Users\Administrador\Documents\Project\build\hello.vcxproj]
C:\Users\Administrador.nw-gyp\0.10.5\deps\v8\include\v8.h(1665) : se
e declaration of 'v8::String'
..\hello.cc(13): error C2664: 'v8::FunctionTemplate::New' : cannot convert para
meter 1 from 'v8::Handle (__cdecl *)(const int)' to 'v8::Isolate *' [C:\User
s\Administrador\Documents\Project\build\hello.vcxproj]
with
[
T=v8::Value
]
There is no context in which this conversion is possible
..\hello.cc(13): error C2227: left of '->GetFunction' must point to class/struc
t/union/generic type [C:\Users\Administrador\Documents\Project\build\he
llo.vcxproj]
..\hello.cc(12): error C3861: 'NewSymbol': identifier not found [C:\Users\Admin
istrador\Documents\FamilySafetyC++\build\hello.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Administrador\AppData\Roamin
g\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\Administrador\AppData\Roaming\npm\node_m
odules\nw-gyp\bin\nw-gyp.js" "build"
gyp ERR! cwd C:\Users\Administrador\Documents\Project
gyp ERR! node -v v0.10.33
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok

nw-gyp --target=0.6.1 rebuild fails due to invalid #include in node.h

On line 63 of ~/.nw-gyp/0.6.1/src/node.h, the line should just read #include "uv.h".

To reproduce the error:

npm install libdtrace
cd node_modules/libdtrace
nw-gyp --target=0.6.1 rebuild

The error will be a colorful clang message saying something like:

  CXX(target) Release/obj.target/libdtrace/libdtrace.o
In file included from ../libdtrace.cc:11:
/Users/Dan/.nw-gyp/0.6.1/src/node.h:63:10: fatal error: 'third_party/deps/uv/include/uv.h' file not found
#include "third_party/deps/uv/include/uv.h"
         ^
1 error generated.

The path in the error message might not be right - after I fixed the issue I forgot what the path was exactly, but it should be easy to figure it out on a fresh installation. I'm running Mac OS X 10.8.4 (libdtrace probably won't build on OSes that don't have dtrace installed).

Wrong platform toolset on Windows 8 with VC++ 2012

nw-gyp configure creates a project file with the wrong platform toolset (v110 not v100) on Windows 8 with VC++ 2012 (possibly only if you've got VC++ 2010 installed as well). This causes a build error. The solution is to open the project in VC++ 2012, right click, choose properties and change the platform toolset from v110 (VC++ 2012) to v100 (VC++ 2010). The build then completes successfully. It would be nice if nw-gyp could detect this scenario and configure the project correctly.

Cannot use nw-gyp to compile the node-lame

I want to use node-lame in node-webkit, but the compiler syntax error.
node-lame : https://github.com/TooTallNate/node-lame

D:\tools\node-webkit\record\node_modules\lame>nw-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:\Windows\Microsoft.NET\Framework\v4.0.30319\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=Win32' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
mp3lame.vcxproj -> D:\tools\node-webkit\record\node_modules\lame\build\Release\libmp3lame.lib
mpg123.vcxproj -> D:\tools\node-webkit\record\node_modules\lame\build\Release\libmpg123.lib
lamevectorroutines.vcxproj -> D:\tools\node-webkit\record\node_modules\lame\build\Release\liblamevectorroutines.lib
node_lame.cc
node_mpg123.cc
bindings.cc
..\src\bindings.cc(29): error C2248: “v8::HandleScope::HandleScope”: 无法访问 protected 成员(在“v8::HandleScope”类中声明) [D:\tools\node-webkit\record\node_module
s\lame\build\b
indings.vcxproj]
C:\Users\liuyunfeng.nw-gyp\0.10.2\deps\v8\include\v8.h(845) : 参见“v8::HandleScope::HandleScope”的声明
C:\Users\liuyunfeng.nw-gyp\0.10.2\deps\v8\include\v8.h(829) : 参见“v8::HandleScope”的声明
d:\tools\node-webkit\record\node_modules\lame\src\node_pointer.h(23): error C2882: “Buffer”: 在表达式中非法使用命名空间标识符 [D:\tools\node-webkit\record\node_modu
les\lame\build\bi
ndings.vcxproj]
d:\tools\node-webkit\record\node_modules\lame\src\node_pointer.h(23): fatal error C1903: 无法从以前的错误中恢复;正在停止编译 [D:\tools\node-webkit\record\node_module
s\lame\build\bind
ings.vcxproj]
d:\tools\node-webkit\record\node_modules\lame\src\node_pointer.h(23): error C2882: “Buffer”: 在表达式中非法使用命名空间标识符 [D:\tools\node-webkit\record\node_modu
les\lame\build\bi
ndings.vcxproj]
d:\tools\node-webkit\record\node_modules\lame\src\node_pointer.h(23): fatal error C1903: 无法从以前的错误中恢复;正在停止编译 [D:\tools\node-webkit\record\node_module
s\lame\build\bind
ings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\liuyunfeng\AppData\Roaming\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\liuyunfeng\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js" "build"
gyp ERR! cwd D:\tools\node-webkit\record\node_modules\lame
gyp ERR! node -v v0.10.26
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok


this attach screenshot:
20140820094926

nw-gyp rebuild fails for node-weak library

Hey,
I'm having an issue rebuilding the node-weak library using nw-gyp (I'm developping a project using node-phantom which relies on node-weak.
The output from the nw-gyp rebuild --target=0.7.5
command is:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp http GET http://node-webkit.s3.amazonaws.com/v0.7.5/nw-headers-v0.7.5.tar.gz
gyp http 200 http://node-webkit.s3.amazonaws.com/v0.7.5/nw-headers-v0.7.5.tar.gz
gyp info spawn python
gyp info spawn args [ '/Users/Migli/.nvm/v0.10.5/lib/node_modules/nw-gyp/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Migli/Sites/meilleur-taux/app/node_modules/phantom/node_modules/dnode/node_modules/weak/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Migli/.nvm/v0.10.5/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/Migli/.nw-gyp/0.7.5/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/Migli/.nw-gyp/0.7.5',
gyp info spawn args   '-Dmodule_root_dir=/Users/Migli/Sites/meilleur-taux/app/node_modules/phantom/node_modules/dnode/node_modules/weak',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/weakref/src/weakref.o
In file included from ../src/weakref.cc:19:
/Users/Migli/.nw-gyp/0.7.5/src/node.h:25:1: warning: "V8_USE_UNSAFE_HANDLES" redefined
In file included from ../src/weakref.cc:18:
/Users/Migli/.nw-gyp/0.7.5/deps/v8/include/v8.h:41:1: warning: this is the location of the previous definition
../src/weakref.cc: In function ‘v8::Handle<v8::Value><unnamed>::Create(const v8::Arguments&)’:
../src/weakref.cc:211: error: invalid conversion from ‘void (*)(v8::Persistent<v8::Value>, void*)’ to ‘void (*)(v8::Isolate*, v8::Persistent<v8::Object>*, <unnamed>::proxy_container*)’
../src/weakref.cc:211: error:   initializing argument 2 of ‘void v8::Persistent<T>::MakeWeak(P*, typename v8::WeakReferenceCallbacks<T, P>::Revivable) [with P = <unnamed>::proxy_container, T = v8::Object]’
make: *** [Release/obj.target/weakref/src/weakref.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Migli/.nvm/v0.10.5/lib/node_modules/nw-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)

Thanks a lot for your help

How to install nw-gyp on win7

hello to all
I just want to build a module with C/C++ addons for node-webkit, but i do not know how to install nw-gyp on win7. I need some course, thank you.

Problem of building node-webkit

Excuse me.I have such a problem like this, HOW to fix it ?
os-ibp-iMac:demo-rio user$ ./node-webkit.app/Contents/MacOS/node-webkit ../nodewebkit/
-bash: ./node-webkit.app/Contents/MacOS/node-webkit: No such file or directory
os-ibp-iMac:demo-rio user$ ./node-webkit-v0.8.4-mac/node-webkit.app/Contents/MacOS/node-webkit ./nodewebkit/
2014-08-15 14:54:52.781 node-webkit[23551:2305841] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[23551:0815/145452:ERROR:breakpad_mac.mm(234)] Breakpad initializaiton failed
2014-08-15 14:54:53.000 node-webkit Helper[23552:2305940] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650

module.js:359
Module._extensions[extension](this, filename);
^
Error: dlopen(/Users/user/demo-test/demo-rio/nodewebkit/node_modules/sqlite3/lib/node_sqlite3.node, 1): no suitable image found. Did find:
/Users/user/demo-test/demo-rio/nodewebkit/node_modules/sqlite3/lib/node_sqlite3.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
at Module.load (module.js:359:32)
at Function.Module._load (module.js:315:12)
at Module.require (module.js:367:17)
at require (module.js:383:17)
at Object.eval (/Users/user/demo-test/demo-rio/nodewebkit/node_modules/sqlite3/lib/sqlite3.js:1:77)
at Module._compile (module.js:459:26)
at Object.Module._extensions..js (module.js:477:10)
at Module.load (module.js:359:32)
at Function.Module._load (module.js:315:12)
at Module.require (module.js:367:17)

nw-gyp cannot build netroute

nw-gyp does not successfully build the netroute module.

nellie:netroute nick$ nw-gyp rebuild --target=0.10.3
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/nw-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/nick/Documents/Personal/kwango/rc/builder/app/node_modules/nat-upnp/node_modules/netroute/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/nw-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/nick/.nw-gyp/0.10.3/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/nick/.nw-gyp/0.10.3',
gyp info spawn args   '-Dmodule_root_dir=/Users/nick/Documents/Personal/kwango/rc/builder/app/node_modules/nat-upnp/node_modules/netroute',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/netroute/src/netroute.o
../src/netroute.cc:31:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
static Handle<Value> GetInfo(const Arguments& args) {
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/netroute.cc:32:15: error: calling a protected constructor of class 'v8::HandleScope'
  HandleScope scope;
              ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/netroute.cc:33:38: error: too few arguments to function call, single argument 'isolate' was not specified
  Local<Object> result = Object::New();
                         ~~~~~~~~~~~ ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:2461:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
../src/netroute.cc:35:11: error: no matching member function for call to 'Set'
  result->Set(ip4_sym, GetInfo(AF_INET));
  ~~~~~~~~^~~
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:2182:8: note: candidate function not viable: no known conversion from 'Persistent<v8::String>' to 'Handle<v8::Value>' for 1st argument
  bool Set(Handle<Value> key,
       ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:2186:8: note: candidate function not viable: no known conversion from 'Persistent<v8::String>' to 'uint32_t' (aka 'unsigned int') for 1st argument
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/netroute.cc:36:11: error: no matching member function for call to 'Set'
  result->Set(ip6_sym, GetInfo(AF_INET6));
  ~~~~~~~~^~~
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:2182:8: note: candidate function not viable: no known conversion from 'Persistent<v8::String>' to 'Handle<v8::Value>' for 1st argument
  bool Set(Handle<Value> key,
       ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:2186:8: note: candidate function not viable: no known conversion from 'Persistent<v8::String>' to 'uint32_t' (aka 'unsigned int') for 1st argument
  bool Set(uint32_t index, Handle<Value> value);
       ^
../src/netroute.cc:38:16: error: no member named 'Close' in 'v8::HandleScope'
  return scope.Close(result);
         ~~~~~ ^
../src/netroute.cc:43:15: error: calling a protected constructor of class 'v8::HandleScope'
  HandleScope scope;
              ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/netroute.cc:45:33: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  ip4_sym = Persistent<String>::New(String::NewSymbol("IPv4"));
                                ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:45:45: error: no member named 'NewSymbol' in 'v8::String'
  ip4_sym = Persistent<String>::New(String::NewSymbol("IPv4"));
                                    ~~~~~~~~^
../src/netroute.cc:46:33: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  ip6_sym = Persistent<String>::New(String::NewSymbol("IPv6"));
                                ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:46:45: error: no member named 'NewSymbol' in 'v8::String'
  ip6_sym = Persistent<String>::New(String::NewSymbol("IPv6"));
                                    ~~~~~~~~^
../src/netroute.cc:47:34: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  dest_sym = Persistent<String>::New(String::NewSymbol("destination"));
                                 ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:47:46: error: no member named 'NewSymbol' in 'v8::String'
  dest_sym = Persistent<String>::New(String::NewSymbol("destination"));
                                     ~~~~~~~~^
../src/netroute.cc:48:37: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  gateway_sym = Persistent<String>::New(String::NewSymbol("gateway"));
                                    ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:48:49: error: no member named 'NewSymbol' in 'v8::String'
  gateway_sym = Persistent<String>::New(String::NewSymbol("gateway"));
                                        ~~~~~~~~^
../src/netroute.cc:49:37: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  netmask_sym = Persistent<String>::New(String::NewSymbol("netmask"));
                                    ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:49:49: error: no member named 'NewSymbol' in 'v8::String'
  netmask_sym = Persistent<String>::New(String::NewSymbol("netmask"));
                                        ~~~~~~~~^
../src/netroute.cc:50:37: error: 'New' is a private member of 'v8::PersistentBase<v8::String>'
  genmask_sym = Persistent<String>::New(String::NewSymbol("genmask"));
                                    ^
/Users/nick/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/netroute.cc:50:49: error: no member named 'NewSymbol' in 'v8::String'
  genmask_sym = Persistent<String>::New(String::NewSymbol("genmask"));
                                        ~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/netroute/src/netroute.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/nw-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild" "--target=0.10.3"
gyp ERR! cwd /Users/nick/Documents/Personal/kwango/rc/builder/app/node_modules/nat-upnp/node_modules/netroute
gyp ERR! node -v v0.10.30
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok 

creates a not loadable module for node-serialport

I am using nw-gyp on windows with configure --target=0.5.0 to build the module "node-serialport" and use it with node-webkit 0.5.0.

The procedure does work on my mac but since I also need to distribute the application on Windows i have to build it on windows too. My Windows XP virtual machine has Vistual Studio 2010 installed. The build works fine with no errors generating serialport.node but then node-webkit is unable to open serialbox.node to load the module.

Uncaught Error: The specified module could not be found.
C:\Documents and Settings\Administrator\Desktop\baseflight-configurator\win\baseflight-configurator\node_modules\serialport\build\Release\serialport.node

even if the file is there.

Building with standard node-gyp and loading it with standard node works fine so.. what to do ?

problem with nw-gyp configure

Hi,
I am having trouble in nw-gyp configure. First i tried nw-gyp configure in the location (D:\opt\usr). I got the following error
2err
Next i changed the nw-gyp folder to (C:\program files\python27) and tried again...
Now .....
3err
Please help...

Help needed with compiling bunyan module

Hello

I've been trying to run my project under node-webkit and and have problem with module called bunyan. It's logger that uses some C code. My knowledges about compiling/linking C code are effectively non existent :(

what I've tried to do:

  1. npm install bunyan

  2. went to node_modules/bunyan/node_modules/dtrace-provider and run nw-gyp configure --target=0.5.0 and nw-gyp build

here's the output

yp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  ACTION binding_gyp_libusdt_target_build_libusdt .
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
  TOUCH Release/obj.target/libusdt.stamp
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_provider.o
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_probe.o
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_argument.o
  SOLINK_MODULE(target) Release/DTraceProviderBindings.node
ld: warning: ignoring file /Users/jodaka/git/reader/node_modules/bunyan/node_modules/dtrace-provider/libusdt/libusdt.a, file was built for archive which is not the architecture being linked (i386): /Users/jodaka/git/reader/node_modules/bunyan/node_modules/dtrace-provider/libusdt/libusdt.a
  SOLINK_MODULE(target) Release/DTraceProviderBindings.node: Finished
gyp info ok```


3) next I've tried to run my code with node-webkit and resulted with following error:
```bash
dyld: lazy symbol binding failed: Symbol not found: _usdt_create_provider
  Referenced from: /Users/jodaka/git/reader/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node
  Expected in: dynamic lookup

dyld: Symbol not found: _usdt_create_provider
  Referenced from: /Users/jodaka/git/reader/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node
  Expected in: dynamic lookup

I guess the problem is somewhere on the second step, with linking with wrong arch, but I have no idea what should I do to make it work. Can you please help me with it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.