Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Undefined symbols in shared libraries



"A. Sajjad Zaidi" wrote:

> Im trying to load a shared library from a java servlet, but get the
> following error:
>
> java.lang.UnsatisfiedLinkError: /xxxx/xxxx.so: /xxxx/xxxx.so: undefined symbol: XXXX

I got this when the libs were not in ld.so.conf.

> When compiling the libraries, I dont get any errors. Shouldn't gcc fail
> if something is missing? These are the flags Im using to build the
> library:
>
> gcc -Wall -I/usr/local/jdk1.3.1/include -I/usr/local/jdk1.3.1/include/linux -c *.c

It's because you are specifying the libpath with -l, but the linker doesn't know about
it when the code is called through java.
Edit ld.so.conf and rerun ldconfig. Or try setting LD_LIBRARY_PATH

--
B0Ti.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links