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'],
},
],
}
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 [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