This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Static linking of JNI code - HOW?


Hello All:

We are creating an application with GCJ and we wish to statically link
our JNI code to bypass the whole shared library mess.  I have been able
to statically link in my JNI code, but the runtime is still looking for
the code in a lib:

# hello.exe
Exception in thread "main" java.lang.UnsatisfiedLinkError: print
   <<No stacktrace available>>

ULE, everyone's favorite!!  How can I set myself up so that our JNI code
is linked in statically?

The test program was created with:
 arm-wince-pe-gcj -fjni --main=HelloWorld HelloWorld.java \
 helloworld.o -lgcj -lgcc -lc -lwinsock -lcoredll

where "helloworld.o" (lowercase) contains the native call.  What to we
have to do to get JNI to work with static linking??

TIA,
craig vanderborgh
voxware incorporated





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]