From: Wei F. <fe...@au...> - 2009-09-18 15:40:55
|
BTW, when I said I did not intentionally specify -shared option, I mean I did not type in the g++ command. It was generated by the mex command that I used: =================== mex -g -v -largeArrayDims -I/usr/include -L/usr/lib -lJudy mex_test_cir_map_target.cpp ... =================== Thanks. Best Regards, Wei >>> Alan Silverstein <aj...@fr...> 9/18/2009 12:03 AM >>> > /usr/bin/ld: /usr/lib//libJudy.a(Judy1Test.o): relocation > R_X86_64_32S against `a local symbol' can not be used when making a > shared object; recompile with -fPIC > /usr/lib//libJudy.a: could not read symbols: Weird. I don't have an answer, but I recall when we developed libJudy in 1999-2001, we didn't even try to ship a shared library version because the dynamic linking basically ate up all of the performance gains. So, yes, libJudy.a is archive only, on purpose. You are using a -shared option, which might or might not have something to do with it, not sure, but anyway, I can't see why a compiler should be unwilling to "fold" (hard-link) *.o files from a *.a file into some code that remains dynamically linkable later. If that's even what you are doing. Alan Silverstein |