1、从github上面下载了一份代码https://github.com/Sparkling-Water/yolo_darknet
2、编译出现了类似这样的错误undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
3、解决方法,在libdarknet源码的Makefile中,找到第140行之后,修改C++11特性配置
ifeq ($(ZED_CAMERA), 1) CFLAGS+= -DZED_STEREO -I/usr/local/zed/include ifeq ($(ZED_CAMERA_v2_8), 1) LDFLAGS+= -L/usr/local/zed/lib -lsl_core -lsl_input -lsl_zed -lstdc++ -D_GLIBCXX_USE_CXX11_ABI=0 else LDFLAGS+= -L/usr/local/zed/lib -lsl_zed -lstdc++ -D_GLIBCXX_USE_CXX11_ABI=0 endif endif
4、重新编译生成libdarknet.so
5、再次编译出现找不到出现 undefined reference to mat_to_image_resize错误
6、修改程序中Makefile添加-DOPENCV,即可编译成功
标签:yolov4,zed,darknet,编译,usr,local,lsl From: https://www.cnblogs.com/eastgeneral/p/16853286.html