I'm trying to register a native function through jni, and to do that, I have to store a pointer to the function in a jninativemethod struct, which has a void* field for the function pointer.
In setting that field, I get the error error: invalid conversion from void (*)(JNIEnv*, _jclass*, jlong, _jobject*)' to void* when compiling with GCC on unix.
I've looked around, and it seems you aren't allowed to convert function pointers to void pointers, so is this interface just broken? Is there a 'right' way to do it? (other than using javah to generate headers and exporting the functions)