Re: java.lang.UnsatisfiedLinkError - native method
- From: andrej.frelih@xxxxxxxxx
- Date: Tue, 13 Nov 2007 07:45:13 -0800
On 13 nov., 15:19, Gordon Beaton <n....@xxxxxxxxx> wrote:
On Tue, 13 Nov 2007 06:05:52 -0800, andrej.fre...@xxxxxxxxx wrote:
Exception in thread "main" java.lang.UnsatisfiedLinkError: helloworld
[...]
my NEWLY added helloworld function contains this "__Fv" at the end
of the name that is why i think it cannot be found by the java
class.
How (exactly) do you compile the native library? Are you using a C
compiler, or a C++ compiler?
I am using the hp-ux aC++ compiler.
Is the failing method declared with extern "C"? It should be, and it
will be if you exactly obeyed the declaration that javah provided for
you in the generated header file. If the signature of your
implementation differs from that in the header file, the extern "C"
javah provided is no longer helping you.
Functions are all marked with extern "C" and i did obey the
declaration( at least i hope so)
of javah.
The .h file looks like that:
extern "C" {
JNIEXPORT jint JNICALL Java_helloworld
(JNIEnv *, jobject);
JNIEXPORT jint JNICALL Java_ApplModify
(JNIEnv *, jobject, jlong, jlong, jlong);
..... there are more functions
}
I very much appreciate your help Gordon.
Need more code?
Regards,
A
/gordon
--
.
- Follow-Ups:
- Re: java.lang.UnsatisfiedLinkError - native method
- From: Gordon Beaton
- Re: java.lang.UnsatisfiedLinkError - native method
- References:
- java.lang.UnsatisfiedLinkError - native method
- From: andrej . frelih
- Re: java.lang.UnsatisfiedLinkError - native method
- From: Gordon Beaton
- java.lang.UnsatisfiedLinkError - native method
- Prev by Date: Re: class loader getResourceAsStream
- Next by Date: Re: Great SWT Program
- Previous by thread: Re: java.lang.UnsatisfiedLinkError - native method
- Next by thread: Re: java.lang.UnsatisfiedLinkError - native method
- Index(es):
Relevant Pages
|