> > Exception in thread "main" java.lang.UnsatisfiedLinkError: helloworld
>
[quoted text clipped - 6 lines]
> 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
>
> --
Gordon Beaton - 13 Nov 2007 17:45 GMT
> I am using the hp-ux aC++ compiler.
And your command line?
> 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:
Of course the generated header file is correct. What does *your* file
look like, in particular the failing method? Do you include the header
file?
/gordon
--