C
cppaddict
When I've gotten unsatisfied link errors before when calling native
methods, it's usually been because the mathod name had been changed in
the Java file, but not updated in the JNI header (and the DLL
recompiled using the new header).
This time, though, the names seemed to be correct.
My java method (part of the Engine class in the package blackjack)
looks like:
public native void init(String windowTitle);
My C JNI method stub look like:
JNIEXPORT void JNICALL Java_blackjack_Engine_init(JNIEnv *, jobject,
jstring);
The DLL compiles without error, and is being loaded without error (in
a static block). What else could be causing the unsatisifed link
error?
TIA,
cpp
methods, it's usually been because the mathod name had been changed in
the Java file, but not updated in the JNI header (and the DLL
recompiled using the new header).
This time, though, the names seemed to be correct.
My java method (part of the Engine class in the package blackjack)
looks like:
public native void init(String windowTitle);
My C JNI method stub look like:
JNIEXPORT void JNICALL Java_blackjack_Engine_init(JNIEnv *, jobject,
jstring);
The DLL compiles without error, and is being loaded without error (in
a static block). What else could be causing the unsatisifed link
error?
TIA,
cpp