From: Vaijayanthi Mala Suresh <vaijayanthimalas@gmail.com>
To: java@gcc.gnu.org
Subject: gcj: issue with run time library loading
Date: Thu, 21 May 2009 08:41:00 -0000 [thread overview]
Message-ID: <6f1633170905210141u3861d1ffh112de85009d88271@mail.gmail.com> (raw)
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
next reply other threads:[~2009-05-21 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 8:41 Vaijayanthi Mala Suresh [this message]
2009-05-21 15:40 ` David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f1633170905210141u3861d1ffh112de85009d88271@mail.gmail.com \
--to=vaijayanthimalas@gmail.com \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).