i am getting undefined symbol errors when System.loadLibrary is 
loading shared object file.


i have a java class called "hello" ( very  simple one like we all 
imagine) it has a single native method and the native method implementation is
in "hello.c" the native method implementation in 
hello.c makes a call to "lstat" 


my gcc compile options are 
%gcc -g -shared -lc_nonshared -I/usr/include 
-I/usr/share/jdk1.1.6/include
-I/usr/share/jdk1.1.6/include/genunix -L/lib -L/usr/lib
-L/usr/share/jdk1.1.6/lib 
-L/usr/share/jdk1.1.6/lib/i686/green_threads hello.c
-o libhello.so

by doing "nm" i find out  that libhello.so has "lstat" with "U" meaning
that it is still undefined.

%java hello
./libhello.so: undefined symbol: lstat (libhello.so)
Can't find class hello

i know that /lib/lib.so.6 has "lstat" undefined (i mean U) and
/usr/lib/libc_nonshared.so has "lstat" defined ( i mean W)
why is the libhello.so still having "lstat" as undefined (i mean U) 
even though i am providing "gcc" the  -l/c_nonshared option


ur help is greatly appreciated ....

-- seshu
[EMAIL PROTECTED]

____________________________________________________________
satya seshu kumar dammu|4087332589|[EMAIL PROTECTED]
             http://www.cslab.uky.edu/~ksdamm0

Dream BIG..... because dreams so small .......
                  hath no power to move men........


____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at 
http://home.netscape.com/netcenter/mail

Reply via email to