New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to another node module #1007
Comments
When you say "module", do you mean separate .node files? Perhaps you can post your binding.gyp(s)? |
Yes I mean separate .node files. Here is an excerpt
|
I don't think you can make that work without either:
I'd probably split off the shared code into a static library ( |
I do actually do this with $ otool -L build/Release/vorbis.node
build/Release/vorbis.node:
@rpath/ogg.node (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 915.0.0) |
Probably I will factor the common code into a static library rather than hack around the nodejs limitations |
I have a few node modules in my project, one of which, module B uses code defined in module A. I have listed module A as a dependency of module B using the "dependencies" directive of the binding.gyp, but when I call function functions in module B, I get undefined symbol errors for code that is defined in module A. This tells me that node-gyp is not linking module B against module A to resolve the code. Is there a way to resolve this behavior?
The text was updated successfully, but these errors were encountered: