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

Re: native threads and Invocation API



>>>>> Gene McCulley writes:

    Gene> That works fine.  But if I try to compile it with native threads
    Gene> instead by changing the above line to:
    Gene> g++ invoketest.c -o invoketest -I/usr/lib/jdk1.1/include \
    Gene> -L/usr/lib/jdk1.1/lib/i386/native_threads -ljava \
    Gene> -L/usr/X11R6/lib -lXm -lXt -lXext -lX11

Try adding '-D_REENTRANT' and '-lpthread'. 

    Gene> I get a link-time error of:
    Gene> /usr/lib/jdk1.1/lib/i386/native_threads/libjava.so: undefined reference to `sem_destroy@@GLIBC_2.0'
    Gene> /usr/lib/jdk1.1/lib/i386/native_threads/libjava.so: undefined reference to `sem_post@@GLIBC_2.0'
    Gene> /usr/lib/jdk1.1/lib/i386/native_threads/libjava.so: undefined reference to `sem_wait@@GLIBC_2.0'
    Gene> /usr/lib/jdk1.1/lib/i386/native_threads/libjava.so: undefined reference to `sem_init@@GLIBC_2.0'
    Gene> collect2: ld returned 1 exit status


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Porting Team
http://www.blackdown.org/java-linux.html


Reply to: