I found out that for Solaris ELF executables you can pass a
"-R/path/to/lib" argument which will record the path and library name into
the executable which will allow it to find it at runtime without needing to
update the LD_LIBRARY_PATH. Is there an equivalent argument for Linux?
On Monday, April 23, 2012 11:48:33 PM UTC-4, Ben Noordhuis wrote:
>
> On Tue, Apr 24, 2012 at 05:45, rhasson <> wrote:
> > Ben,
> >
> > When I get rid of LD_LIBRARY_PATH and include the ldflags and libraries
> > lines in by binding.gyp file the shared library is not linked as shown
> by
> > ldd. If I set the LD_LIBRARY_PATH then it links it correctly.
> >
> > Is ldflags not parsed correctly?
> >
> > Here is my gyp file:
> >
> > {
> > 'targets': [
> > {
> > 'target_name': 'freeling',
> > 'type': 'loadable_module',
> > 'product_extension': 'node',
> > 'product_prefix': '',
> > 'include_dirs': ['.','/home/roy/freeling/free3/include',
> > '/home/roy/cvv8/include/cvv8'],
> > 'conditions': [
> > ['OS=="linux"', {
> > 'link_settings': {
> > 'ldflags': ['-L/home/roy/freeling/free3/lib/'],
> > 'libraries': ['/home/roy/freeling/free3/lib/libfreeling.so']
> > },
> > }],
> > ],
> > 'sources': ['freeling.cc', 'freeling_tokenizer.cc',
> > 'freeling_splitter.cc', 'helper.cc'],
> > },
> > ],
> > }
> >
>
> You should set it like this:
>
> 'link_settings': {
> 'ldflags': ['-L/home/roy/freeling/free3/lib/', '-lfreeling'],
> },
>
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en