我的JAVA类
public class Sys {
public static native String showHDSerial(); static {
System.loadLibrary("Sys");
} public String getHdSer(){
return showHDSerial();
}}
C++类Sys.cpp函数名如下
JNIEXPORT string JNICALL Java_Sys_showHDSerial(JNIEnv *env, jclass jcls)
{ ……
} 现在要编译成DLL的DEF文件该怎么写啊,因为我希望有个string返回值从C++函数返回给JAVA
public class Sys {
public static native String showHDSerial(); static {
System.loadLibrary("Sys");
} public String getHdSer(){
return showHDSerial();
}}
C++类Sys.cpp函数名如下
JNIEXPORT string JNICALL Java_Sys_showHDSerial(JNIEnv *env, jclass jcls)
{ ……
} 现在要编译成DLL的DEF文件该怎么写啊,因为我希望有个string返回值从C++函数返回给JAVA
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货