如何将zeromq与电子应用捆绑在一起?

时间:2015-04-30 06:39:56

标签: zeromq electron

zmq引入我的Electron应用程序已被证明是繁重的:

01:33:03 {master %=} rgbkrk@puter ~/code/jupyter-sidecar$ electron .
dyld: lazy symbol binding failed: Symbol not found: __ZN2v89Signature3NewEPNS_7IsolateENS_6HandleINS_16FunctionTemplateEEEiPS5_
  Referenced from: /Users/rgbkrk/code/jupyter-sidecar/node_modules/zmq/build/Release/zmq.node
  Expected in: dynamic lookup

dyld: Symbol not found: __ZN2v89Signature3NewEPNS_7IsolateENS_6HandleINS_16FunctionTemplateEEEiPS5_
  Referenced from: /Users/rgbkrk/code/jupyter-sidecar/node_modules/zmq/build/Release/zmq.node
  Expected in: dynamic lookup

/usr/local/bin/electron: line 2: 46288 Trace/BPT trap: 5       "/usr/local/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron" "$@"

我应该如何捆绑zmq?作为环境的一部分,我所做的就是运行npm install --save zmq

1 个答案:

答案 0 :(得分:1)

您可以使用zeromq.js

它具有与zmq相同的API,但具有针对Node和Electron的预构建静态二进制文件。因此,没有必要使用适当的C / C ++编译器工具链:

npm install zeromq

对于电子特定说明,请检出https://github.com/zeromq/zeromq.js#rebuilding-for-electron