私はいくつかの事前に書かれたC + +プログラムと対話することができるように私はJNIの呼び出しを探しています、私はC + +を知っていないが、いくつかの基本を学ぼうとしています。私はちょうど私のJNIメソッドの外メソッドへの単純な呼び出しをやろうとしているが、常に次のエラーを取得されています:JNIを使用したC++でのメソッド呼び出し?
エラーc3861「をMyMethodは」:識別子が
#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;
}
wisdomeの任意の言葉を見つけていませんか?
ありがとう!愚かな私は、ヘッダービジネスについて忘れてしまった –