public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* gcj: issue with run time library loading
@ 2009-05-21  8:41 Vaijayanthi Mala Suresh
  2009-05-21 15:40 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-05-21  8:41 UTC (permalink / raw)
  To: java

Hi,

I am trying to use JNI calls using gcj.

Hello.java is the jave code having a native method.

gcj -c -fjni Hello.java -o MyApp.o
gcjh Hello -o MyApp.h
ar -rcs libHello.a MyApp.o

Hello.c contains the native code implementation
gcjh -jni Hello
g++ -c Hello.c
ar rcs libNative.a Hello.o


I have a test.cpp where I have initialized the JVM and I am trying to
invoke a method in the Java code which inturn invokes the native
method. I have linked the above libraries along with test.o

I am getting the following error

Unhandled Java exception:
java.lang.UnsatisfiedLinkError: natPrint
   <<No stacktrace available>>

Can anyone help me to resolve this problem.

Thanks
Mala

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-21 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-21  8:41 gcj: issue with run time library loading Vaijayanthi Mala Suresh
2009-05-21 15:40 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).