This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
compiling an app that depends on a
- To: gcj <java at gcc dot gnu dot org>
- Subject: compiling an app that depends on a
- From: wavelet bot <waveletbot at yahoo dot com>
- Date: Wed, 26 Sep 2001 14:55:23 -0700 (PDT)
Hi,
I am a gcj newbie. I just installed gcc 3.0.1 and tested it with a simple
HelloWorld program. Now, I have a slightly more useful application that I
would like to compile. This application depends on a java usb library that
consists of a jar file ( jusb.jar ). Also, some the classes in the jar file
include native methods. These methods are implemented in a shared library
called libjusb.so. So, to run my application as a java app, I just put the jar
file in /usr/java/jdk1.3.1/jre/lib/ext and put libjusb.so in
/usr/java/jdk1.3.1/jre/lib/i386 and everything works just fine...except for one
thing: I get a segmentation fault error when one of the native methods in the
jusb code is executed. I have tried running strace on the app but it does not
provide me with any useful information. So, I would like to compile the jusb
library code and my application code so that everything is executing natively,
and then use gdb to get some useful debug information. My question is simply,
how do I do this. What steps do I take in order to compile the jar file code
and my application code and get it all working with the shared library and
everything. I don't have much experience with compiling and linking c code, so
I suspect that is where my confusion lies. Explicit instructions would be
greatly appreciated. Thanks very much. Oh yea, I should mention that I do
have access to all the source code for the jusb library.
jef
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com