Re: [nodejs] Re: Unable to load shared library

2012-03-30 Thread rhasson
So I commented out everything and slowly uncommented things until I got the error. I found out that when I try to save something to my object I get the undefined symbol error. Here is my code, see the note marked with *: v8::Handle FreeLingTokenizer::New(const v8::Arguments& args) { v8::H

Re: [nodejs] Re: Unable to load shared library

2012-03-30 Thread Nathan Rajlich
Perhaps use a fully qualified reference to your class (FreeLingTokenizer::FreeLingTokenizer) ? I'm not really sure without seeing your code. On Fri, Mar 30, 2012 at 2:31 PM, rhasson wrote: > Nathan, > > Thanks for the help. I was finally able to link my static library with my > module but now I

Re: [nodejs] Re: Unable to load shared library

2012-03-30 Thread rhasson
Nathan, Thanks for the help. I was finally able to link my static library with my module but now I'm again getting an undefined symbol error but this time on my own module's methods. I can't seem to get away from this problem. [root@localdev Release]# ldd freeling.node linux-gate.so.1 => (0

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread Nathan Rajlich
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 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, 2

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread rhasson
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 o

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread Nathan Rajlich
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 modu

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread rhasson
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 pro

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread Nathan Rajlich
> 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 You received

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread rhasson
[root@localdev Debug]# ldd freeling.node linux-gate.so.1 => (0x00ee2000) libfreeling-3.0-alfa1.so => not found libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0011) libm.so.6 => /lib/libm.so.6 (0x00c29000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00ae7000) libpthread.so.0 => /lib/libpthread.so.0 (

Re: [nodejs] Re: Unable to load shared library

2012-03-29 Thread Nathan Rajlich
What does `ldd freeling.node` say (assuming you're on Linux)? On Wed, Mar 28, 2012 at 10:51 PM, rhasson wrote: > Nathan, > > I have a question about node-gyp. I have a native library that I'm > building a node binding for. that library (freeling) has been > built separately and in the build di

[nodejs] Re: Unable to load shared library

2012-03-28 Thread rhasson
Nathan, I have a question about node-gyp. I have a native library that I'm building a node binding for. that library (freeling) has been built separately and in the build directory has an include and lib folders with the headers and .so files. I built my module (the node binding to freeling)

[nodejs] Re: Unable to load shared library

2012-03-27 Thread rhasson
Never mind, I found the problem. In my .cc file I was declaring the function as GetWString() instead of FreeLingTokenizer::GetWString(). After adding the scope it was ok. Now I have another bug but I'll spare you my debugging unless I get stuck. Thank you, switching to 0.7.6 and node-gyp was

[nodejs] Re: Unable to load shared library

2012-03-27 Thread rhasson
Ok, so I installed 0.7.6 and compiled with node-gyp fine and this time a little more details but I'm not sure how to resolve this issue. > process.version 'v0.7.6' > l = require('./freeling.node') Error: /home/roy/freeling/node_bind/build/Debug/freeling.node: undefined symbol: _ZN17FreeLingToken