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 ?

Now if I set the LD_LIBRARY_PATH I can require the module and it works. 
 But if I don't set it, require fails saying it can't find the shared 
library.

Roy

On Monday, April 23, 2012 11:03:15 PM UTC-4, Ben Noordhuis wrote:
>
> On Tue, Apr 24, 2012 at 04:46, rhasson <> wrote:
> > I'm using node-gyp and ldflags didn't work for me either.  Maybe Nathan 
> has
> > an idea, but I found out that I needed to set the LD_LIBRARY_PATH 
> otherwise
> > my shared library wouldn't link.
>
> The ldflags setting is what is passed to the linker at the time of
> compilation. LD_LIBRARY_PATH affects the search path of the dynamic
> linker, which is what is run when a program starts up.
>
> What I mean to say is that a linker is not the same thing as a dynamic
> linker (though they're related) and that gyp is only involved in the
> compilation phase.
>
>

-- 
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