On Tue, Apr 24, 2012 at 05:23, rhasson <rhas...@gmail.com> wrote:
> ok that makes sense.  So the question is, once gyp compiled and the linker
> linked the shared library into the .node module using ldflags.  How do you
> require the module without needing to set the LD_LIBRARY_PATH ?

You don't*. The dynamic linker only searches in a set of blessed paths
unless you set LD_LIBRARY_PATH. You can dlopen() the .so and look up
symbols with dlsym() (but watch out for C++ name mangling).

* Okay, that's not entirely true. There are hacks like setting $ORIGIN
but not all linkers support that.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to