ppogg / YOLOv5-Lite

🍅🍅🍅YOLOv5-Lite: Evolved from yolov5 and the size of model is only 900+kb (int8) and 1.7M (fp16). Reach 15 FPS on the Raspberry Pi 4B~
GNU General Public License v3.0
2.28k stars 407 forks source link

c++ ort make的时候报错undefined reference to `OrtGetApiBase' #265

Open defzhangaa opened 5 months ago

defzhangaa commented 5 months ago

按照操作步骤,直到cmake .. 都正常,然后执行make -j就不行了 报错信息如下: [ 50%] Building CXX object CMakeFiles/demo.dir/main.cpp.o [100%] Linking CXX executable demo /usr/bin/ld: CMakeFiles/demo.dir/main.cpp.o: in function __static_initialization_and_destruction_0(int, int)': main.cpp:(.text+0x17d6): undefined reference toOrtGetApiBase' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/demo.dir/build.make:132: demo] Error 1 make[1]: [CMakeFiles/Makefile2:76: CMakeFiles/demo.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

trieu1162000 commented 1 week ago

Hi @defzhangaa , you can fix this issue by do the below commands:

$ cd lib
$ rm libonnxruntime.so
$ ln -s libonnxruntime.so.1.12.1 libonnxruntime.so
$ ls -rlt
total 14848
-rw-rw-r-- 1 ngerr ngerr 15200880 Nov  7 01:12 libonnxruntime.so.1.12.1
lrwxrwxrwx 1 ngerr ngerr       24 Nov  7 07:22 libonnxruntime.so -> libonnxruntime.so.1.12.1

BRs,