Sparkling-Water/yolo_darknet

In linux, compile darknet as libdarknet.so. I just write a simple yolo_console_dll.cpp to link .so.

Closed this issue · 1 comments

when i type the command as g++ -fPIC -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 yolo_console_dll.cpp -L./lib/ -I. -ldarknet $(pkg-config --cflags --libs opencv) -o test.
The error is /tmp/ccis7rE8.o:in function‘main’中: yolo_console_dll.cpp:(.text+0xb11):‘Detector::Detector(std::string, std::string, int)’undefined reference collect2: error: ld returned 1 exit status

ok, just modified the <yolo_v2_class.hpp> "LIB_API Detector(std::string cfg_filename, std::string weight_filename, int gpu_id = 0, int batch_size = 1);"