Re: problem with jni lib

2000-11-02 Thread kason wong
I used g++ instead of gcc now and it seems the error is fixed. thanks for your help. l learned a lot about library files now. Cheers, Kason Joi Ellis wrote: > On Tue, 31 Oct 2000, kason wong wrote: > > > Hi, > > > > I guess I know what's the really problem is. > > > > I think I should make my p

Re: problem with jni lib

2000-10-31 Thread Joi Ellis
On Tue, 31 Oct 2000, kason wong wrote: > Hi, > > I guess I know what's the really problem is. > > I think I should make my problem more clear. I used to use libutil.a libpthread.a >libcops.a to make ReqMsg.cxx executable. now I want to use COPS.cxx and > .h files (JNI layers) to link a java

Re: problem with jni lib

2000-10-31 Thread Joi Ellis
On Tue, 31 Oct 2000, kason wong wrote: > Hi, > > I get another problem when i ran the java program with jni calling c++ program. > Is it the bug of green thread? See Liang's JNI book, page 141. It discusses the evils of mixing thread models. Liang doesn't mention Linux specifically here, but

Re: problem with jni lib

2000-10-31 Thread kason wong
Hi, I guess I know what's the really problem is. I think I should make my problem more clear. I used to use libutil.a libpthread.a libcops.a to make ReqMsg.cxx executable. now I want to use COPS.cxx and .h files (JNI layers) to link a java program to call ReqMsg. so I modified a little of yo

Re: problem with jni lib

2000-10-31 Thread kason wong
Hi, I get another problem when i ran the java program with jni calling c++ program. Is it the bug of green thread? method unknown (eip = 400dc51b) SIGSEGV 11* segmentation violation si_signo [11]: SIGSEGV 11* segmentation violation si_errno [0]: Success si_code [0]: SI_USER [pi

Re: problem with jni lib

2000-10-30 Thread Joi Ellis
On Mon, 30 Oct 2000, kason wong wrote: > I guess I finally understand. but i still have problem in compiling one lib: >libutil.so which > used the libpthread.a lib in c. I try to convert libpthread.a to .so, it seems >strange but > when i load it: > > ld -shared -o libpthread.so --whole-archiv

Re: problem with jni lib

2000-10-30 Thread kason wong
I guess I finally understand. but i still have problem in compiling one lib: libutil.so which used the libpthread.a lib in c. I try to convert libpthread.a to .so, it seems strange but when i load it: ld -shared -o libpthread.so --whole-archive /local/usr/lib/libpthread.a ldd -r libpthread.so

Re: problem with jni lib

2000-10-30 Thread Joi Ellis
On Mon, 30 Oct 2000, kason wong wrote: > Hi, > > thanks, but I still have some problem when i tried to compile all lib into a static >lib. > > g++ -o libCOPS.a COPS.o -L/home/kwong/thesis/codes/lib -lcops -lutil -lpthread > /usr/lib/crt1.o: In function `_start': > /usr/lib/crt1.o(.text+0x18):

Re: problem with jni lib

2000-10-30 Thread kason wong
Hi, thanks, but I still have some problem when i tried to compile all lib into a static lib. g++ -o libCOPS.a COPS.o -L/home/kwong/thesis/codes/lib -lcops -lutil -lpthread /usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x18): undefined reference to `main' collect2: ld returned 1

Re: problem with jni lib

2000-10-29 Thread Joi Ellis
On Sun, 29 Oct 2000, kason wong wrote: > Hi, > > Can i load more than one library in jni? I have 4 lib used in my program: > System.loadLibrary("pthread"); > System.loadLibrary("util"); > System.loadLibrary("cops"); > System.loadLibrary("COPS"); > > and i 've got this error msg when i run m

Re: problem with jni lib

2000-10-29 Thread kason wong
Hi, Can i load more than one library in jni? I have 4 lib used in my program: System.loadLibrary("pthread"); System.loadLibrary("util"); System.loadLibrary("cops"); System.loadLibrary("COPS"); and i 've got this error msg when i run my program Exception in thread "main" java.lang.Unsatisfied

Re: problem with jni lib

2000-10-29 Thread Joi Ellis
On Sun, 29 Oct 2000, kason wong wrote: > hi, > > I'm not sure this is the mail-list i should send my question. please > let me know if I've got the right place. > > my problem is in the compiling a function in c++ to a .so lib file. the > case is I use a couple static .a lib in that c++ progra

problem with jni lib

2000-10-29 Thread kason wong
hi, I'm not sure this is the mail-list i should send my question. please let me know if I've got the right place. my problem is in the compiling a function in c++ to a .so lib file. the case is I use a couple static .a lib in that c++ program and when i compile it to a .so lib. it doesn't inclu