3

JNI Java インターフェイス関数を使用して DLL をコンパイルします。ヘッダーファイルには次のものがあります:

#include <jni.h>
/* Header for class net_sf_junace_UnACE */

#ifndef _Included_net_sf_junace_UnACE
#define _Included_net_sf_junace_UnACE
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT void JNICALL Java_net_sf_junace_UnACE_nativeACEList
  (JNIEnv *, jobject, jobject, jstring, jobject);
#ifdef __cplusplus
}
#endif
#endif

MS Visual C++ の装飾名: _Java_net_sf_junace_UnACE_nativeACEList@20

GCC: Java_net_sf_junace_UnACE_nativeACEList@20

JNI では先頭にアンダースコアが必要です。それを生成するためにGCCをどのように強制しますか? -fleading-underscore が役に立たないのはなぜですか?

4

0 に答える 0