Hi Troy, Thanks for the explanation. I did what you suggested. First, when I did:
ls /usr/lib/libJudy* I got 3 files: /usr/lib/libJudy.a /usr/lib/libJudy.so.1 /usr/lib/libJudy.so.1.0.1 Then I copied /usr/lib/libJudy.so.1.0.1 (since I did not have libJudy.so.1.0.3) to my local directory where my cpp file existed. I added "-L" to the *FLAGS lines and "-Wl -rpath $(pwd)" to the *LIBS lines. But when I tried to compile with: mex -g -v -lJudy test_judy.c it gave me the following error: g++: unrecognized option '-rpath' followed by the same error: "relocation R_X86_64_32 against 'a local symbol' cannot be used when making a shared object; recompile with -fPIC" So I went back and saw that there was "$RPATH". I removed the "-rpath" option from the *LIBS line and tried again. But the same "relocation blah blah" error happened. I also tried to put "$(pwd)" after $RPATH but the same error happened. Best Regards, Wei >>> Troy Heber <[email protected]> 9/19/2009 2:38 PM >>> On 09/19/09 02:17, Wei Feng wrote: <snip> I'm just not sure why the static library is getting picked up instead of the shared library. What do you get when you do: ls /usr/lib/libJudy* You might try copying /usr/lib/libJudy.so.1.0.3 to your local directory and then and the following options: On the "* flags" lines add -L. and on the "*LIBS lines" add -Wl,-rpath,$(pwd) Troy ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Judy-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/judy-devel
