当前位置: 首页 > 工具软件 > Libhello > 使用案例 >

Cannot load hello library: java.lang.UnsatisfiedLinkError: /opt/wdh/jni/libhello.so: /opt/wdh/jni/li

陶俊晤
2023-12-01
JNI中遇到的错误: Cannot load hello library:

java.lang.UnsatisfiedLinkError: /opt/wdh/jni/libhello.so: /opt/wdh/jni/libhello.so: undefined symbol: __gxx_personality_v0


cc编译步骤有问题,需要使用g++进行编译
g++ -fPIC -O2 -shared -Wl,-soname,libhello.so.1 -o libhello.so.1.0 -I/usr/local/java/include/ -I/usr/local/java/include/linux Hello.cpp

 类似资料: