On Jan 9, 2017, at 12:41, Rohit Harchandani wrote: > I have a static library built on my 64-bit Mac OSX (libcryptopp.a). I use > this to create a node.js addon which works fine on my machine. However, when > I build the same module on a colleagues machine (again a 64-bit Max OS X), > using the same static library built on my machine, the node module does not > work. On loading the module, the following error is thrown: > > module.js:583 > return process.dlopen(module, path._makeLong(filename)); > ^ > > Error: > dlopen(/Users/rharchandani/node_modules/seif-crypto-node/build/Release/seif-crypto-node.node, > 1): Symbol not found: __ZN8CryptoPP10RandomPool18IncorporateEntropyEPKhm > Referenced from: > /Users/rharchandani/node_modules/seif-crypto-node/build/Release/seif-crypto-node.node > Expected in: flat namespace > in > /Users/rharchandani/node_modules/seif-crypto-node/build/Release/seif-crypto-node.node > at Error (native) > at Object.Module._extensions..node (module.js:583:18) > at Module.load (module.js:473:32) > at tryModuleLoad (module.js:432:12) > at Function.Module._load (module.js:424:3) > at Module.require (module.js:483:17) > at require (internal/module.js:20:19) > at Object.<anonymous> > (/Users/rharchandani/node_modules/seif-crypto-node/index.js:1:75) > at Module._compile (module.js:556:32) > at Object.Module._extensions..js (module.js:565:10) > > The above symbol is from the static library. Any other C++ program built > using the same static library, works on both the machines. Any help is > appreciated.
Difficult to say without further information. What versions of macOS are you using? Is it possible there is a C++ library mismatch? Apple switched the default C++ library from libstdc++ in OS X 10.8 and earlier to libc++ in OS X 10.9 and later. On macOS, it has always been preferable to use dynamic libraries anyway; maybe you should try that. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/B087F474-6B53-4ACC-A729-1921A21F3E92%40ryandesign.com. For more options, visit https://groups.google.com/d/optout.
