How to call function prototypes in C/C++/C# in Xamarin IDE
I have come so far while trying to compile code using imported Java source codes.
One or few last steps. In the main routine, where would I reference function prototype?
Here is the screenshot below`// Save as "HelloJNI.c"
/Function prototype to be called in main routine/
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv*, jobject)
Users can assist me in how to resolve this prototype calling issue, as long as it is related to within the scope of this topic.
You don't call a prototype. You call the function itself.
A prototype is a declaration that provides the compiler essential information about the function so that when you do call the function, the compiler can generate the correct code to execute that call.
If the function you intend to call is the one you showed, then you need to define two objects, one of type JNIEnv (call it x for example) and one of type jobject (call it y). You would then call the function with a statement of the form
Otherwise, you need to provide more detail regarding your question.
Sign in to comment
That makes more sense.
I have been scrambling for updated tutorials regarding running and deploying apps on multiple operating systems.