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

Re: Problem with JNI

2000-03-31 Thread Artur Biesiadowski
Natarajan SK wrote: > The relevent code is something like this. > >Class Conn code segment: >Print.printl("About to create message"); >Message message = new >Message( msginde

Problem with JNI

2000-03-30 Thread Natarajan SK
Hi, I've racked more brains than I've got trying to figure this out. If someone can give me a hint as to how I can proceed with solving this problem, I would be obliged. I'm invoking the JVM using dlopen to open the 1.2.2 libjvm.so and am doing a dlsym of the JNI init args and JNI Creat

Re: Problem with JNI

2000-01-05 Thread Ekkehard Kraemer
Hallo Pierre, PHr>Does anybody know where is the error ? Did you specify a package for your java file? If you did, then you must call javah appropriately. MbG, Ekkehard -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a sub

Re: Problem with JNI

2000-01-05 Thread Pierre Héroux
I have fixed my problem. I forgot to include the Native.h file produced by javah which includes the extern "C". Pierre. Mark Delafranier wrote: > You will probably have to extern "C" the code in your C++ library. JNI uses C > calling conventions. > > Mark &g

Re: Problem with JNI

2000-01-05 Thread Mark Delafranier
You will probably have to extern "C" the code in your C++ library. JNI uses C calling conventions. Mark Pierre Héroux <[EMAIL PROTECTED]> on 01/05/2000 03:47:12 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Mark Delafranier/SYBASE) Subject:

Re: Problem with JNI

2000-01-05 Thread Weiqi Gao
Pierre Héroux wrote: > > I hava a problem with JNI. > I use RedHat 6.1 and jdk1.2.2. > > The following code doesn't work > > public class Native { > static { > System.loadLibrary("Native"); > System.out.println("The Li

Problem with JNI

2000-01-05 Thread Pierre Héroux
I hava a problem with JNI. I use RedHat 6.1 and jdk1.2.2. The following code doesn't work public class Native { static { System.loadLibrary("Native"); System.out.println("The Library is loaded..."); } public Native() {} public native void Hello();