Here's how node-ffi is doing it: https://github.com/rbranson/node-ffi/blob/master/binding.gyp#L25-27
On Thu, Mar 29, 2012 at 10:54 AM, rhasson <[email protected]> wrote: > If I was to get a static version of the library, how would I configure the > binding.gyp to take advantage of it? > > > On Thursday, March 29, 2012 1:48:55 PM UTC-4, Nathan Rajlich wrote: > >> All my experience has been with static compiled modules. That's what I'm >> doing with node-ffi. If libfreeling offers precompiled static versions of >> the library for you to use, I would suggest going that route. Another such >> option is bundling libfreeling in your repo and compiling it during your >> module's build (by converting it to gyp; this is sometimes easy, sometimes >> hard/impossible). >> >> On Thu, Mar 29, 2012 at 9:15 AM, rhasson <> wrote: >> >>> yes I did. I placed in the same directory as my library .cc files, I >>> placed it in the freeling.node directory. >>> >>> I'm suspicious to how I'm setting up my binding.gyp file. I can't >>> figure out how to tell in my binding.gyp file that I need my library to >>> link with an external .so file. Can you provide a sample .gyp file that >>> show that? >>> >>> This is what I have but it still doesn't like >>> libfreeling-3.0-alfa1.soproperly. >>> >>> { >>> 'targets': [ >>> { >>> 'target_name': 'freeling', >>> 'type': 'loadable_module', >>> 'product_extension': 'node', >>> 'product_prefix': '', >>> 'include_dirs': ['/home/roy/freeling/free3/**include'], >>> 'link_settings': { >>> 'libraries': ['libfreeling-3.0-alfa1.so'], >>> 'library_dirs': ['/home/roy/freeling/free3/**lib'], >>> }, >>> 'sources': ['freeling.cc', 'freeling_tokenizer.cc'], >>> }, >>> ], >>> } >>> >>> >>> On Thursday, March 29, 2012 11:43:24 AM UTC-4, Nathan Rajlich wrote: >>>> >>>> >>>> libfreeling-3.0-alfa1.so => not found >>>>> >>>> >>>> So that needs to be fixed :p >>>> >>>> Did you try placing libfreeling-3.0-alfa1.so in the same directory as >>>> freeling.node? >>>> >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-* >>> *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 >>> nodejs+unsubscribe@**googlegroups.com<nodejs%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en> >>> >> >> -- > 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 > -- 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
