我正在尝试将node-java https://github.com/joeferner/node-java安装在
Windows 7 64-bit
JDK 6.45 32bit
MS Visual Studio 2013
node.js v6.9.5 我收到一个LNK2001错误:
java.obj : error LNK2001: unresolved external symbol __imp_JNI_CreateJavaVM [C:\Users\seven\workspace\silver\deployment
s\apps\electron-quick-start\node_modules\java\build\nodejavabridge_bindings.vcxproj]
C:\Users\seven\workspace\silver\deployments\apps\electron-quick- start\node_modules\java\build\Release\nodejavabridge_bindings.node : fatal error LNK1120: 1 unresolved externals [C:\Users\seven\workspace\silver\deployments\apps\electron-quick- start\node_modules\java\build\nodejavabridge_bindings.vcxproj]
gyp ERR! build error我哪里做错了?谢谢。
发布于 2017-09-13 19:07:21
我设法解决了这个问题,安装了Node的32位版本,并在重新构建时将right arch flag传递给node gyp。
--arch=ia32
在此之后,一切都运行得很好。我可以在Electron应用程序中成功地使用node-java库。无论是在开发中还是在打包的应用程序中。在那之后,我面临的问题是ASAR压缩以某种方式添加了?//运算符,这导致我无法在其他计算机上使用打包的应用程序:S。
https://stackoverflow.com/questions/43117217
复制相似问题