Hey Folks,
So i have been looking into JNI calls so i can interact with some pre written C++ programs, i dont know any C++ but am trying to learn some basics. I have just been trying to do a simple call to a method outside my JNI method but always get the following error:
error c3861 'myMethod': identifier not found
#include <stdio.h>
#include <string.h>
#include "StringFuncs.h"
JNIEXPORT jstring JNICALL Java_StringFuncs_changeWord(JNIEnv *env, jobject obj, jstring inStr, jint inLen)
{
const char *inString;
inString = env->GetStringUTFChars(inStr, NULL);
char otherString[40];
strcpy_s(otherString,inString);
if(myMethod())
{
memset(otherString, '-', inLen);
}
jstring newString = env->NewStringUTF((const char*)otherString);
return newString;
}
bool myMethod()
{
return true;
}
int main()
{
return 0;
}
Any words of wisdome?