尝试构建JNI共享库时出现错误
<NavigationAuth />
该文件对我来说完全有效:
m082166@R5191920 $ gcc-9 -fopenmp -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/darwin/" -o libjni.jnilib -shared c_src/My_Java.c
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:
"_cblas_dgemm", referenced from:
_Java_CRC_1Prediction_InferenceAlgoCancer_convergeMatrixMKL in ccszHe7p.o
"_free", referenced from:
_Java_CRC_1Prediction_InferenceAlgoCancer_convergeMatrixJNI in ccszHe7p.o
_Java_CRC_1Prediction_InferenceAlgoCancer_convergeMatrixMKL in ccszHe7p.o
"_malloc", referenced from:
_Java_CRC_1Prediction_InferenceAlgoCancer_convergeMatrixJNI in ccszHe7p.o
_Java_CRC_1Prediction_InferenceAlgoCancer_convergeMatrixMKL in ccszHe7p.o
ld: symbol(s) not found for architecture x86_64
为什么不链接?