joeferner / node-java

Bridge API to connect with existing Java APIs.
MIT License
1.88k stars 283 forks source link

build fails with unresolved externals #261

Open mulderp opened 9 years ago

mulderp commented 9 years ago

When trying to run npm install I get a:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xlocale(336): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc (..\src\utils.cpp) [C:\Users\pmu\nodejs\nodejava\node_module
s\java\build\nodejavabridge_bindings.vcxproj]
     Creating library C:\Users\pmu\nodejs\nodejava\node_modules\java\build
  \Release\nodejavabridge_bindings.lib and object C:\Users\pmu\nodejs\node
  java\node_modules\java\build\Release\nodejavabridge_bindings.exp
java.obj : error LNK2001: unresolved external symbol __imp__JNI_CreateJavaVM@12
 [C:\Users\pmu\nodejs\nodejava\node_modules\java\build\nodejavabridge_bind
ings.vcxproj]
C:\Users\pmu\nodejs\nodejava\node_modules\java\build\Release\nodejavabridg
e_bindings.node : fatal error LNK1120: 1 unresolved externals [C:\Users\pmu\nodejs\nodejava\node_modules\java\build\nodejavabridge_bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\nod
e_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\pmu\nodejs\nodejava\node_modules\java
gyp ERR! node -v v0.12.3
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "java"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! code ELIFECYCLE
NickTulett commented 9 years ago

Try installing Visual Studio 2015 Community Edition with C++ support. That worked for me.