After doing all this, I still get the following error message:
=====================
-> g++ -c  -I/usr/local/matlab2007b/extern/include 
-I/usr/local/matlab2007b/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE 
-L -fPIC -fno-omit-frame-pointer -pthread  -DMX_COMPAT_32 -g test_judy.cpp

-> gcc -c  -I/usr/local/matlab2007b/extern/include 
-I/usr/local/matlab2007b/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE 
-fexceptions -L -fPIC -fno-omit-frame-pointer -pthread  -DMX_COMPAT_32 -g 
/usr/local/matlab2007b/extern/src/mexversion.c

-> g++ -g -pthread -shared 
-Wl,--version-script,/usr/local/matlab2007b/extern/lib/glnxa64/mexFunction.map 
-Wl,--no-undefined -o test_judy.mexa64  test_judy.o mexversion.o  -lJudy 
-Wl,-rpath-link,/usr/local/matlab2007b/bin/glnxa64 
-L/usr/local/matlab2007b/bin/glnxa64 -lmx -lmex -lmat -lm -lm 
-Wl,-rpath,/home/wfeng/research/CodeLibrary/Judy/test

/usr/bin/ld: test_judy.o: relocation R_X86_64_32 against `a local symbol' can 
not be used when making a shared object; recompile with -fPIC
test_judy.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

    mex: link of 'test_judy.mexa64' failed.
=====================


Thanks.



Best Regards,
 
Wei


>>> Troy Heber <[email protected]> 9/21/2009 9:59 AM >>>
On 09/19/09 22:08, Wei Feng wrote:
> 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

Sorry, I should have said libJudy.so*, please rm the libJudy.a file as
that is the one causing problems.

> 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:

It should be "-Wl,-rpath,$(pwd)", make sure you have commas not
spaces!

Troy


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to