AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.71k stars 7.96k forks source link

raspberrypi can't make #6458

Closed x12901 closed 4 years ago

x12901 commented 4 years ago

I was successful before, and then I wanted to use api, I reinstalled opencv, and then it didn’t work pi@raspberrypi:~/darknet $ make chmod +x *.sh g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -fPIC obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o -o darknet -lm -pthread pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv /usr/bin/ld: obj/image_opencv.o: in function load_image_mat_cv': image_opencv.cpp:(.text+0x300): undefined reference tocv::imread(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x308): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x388): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0xd6c): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in functioncreate_window_cv': image_opencv.cpp:(.text+0x1f78): undefined reference to cv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x1f80): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x1fb4): undefined reference to cv::moveWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x1fbc): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x1ff0): undefined reference to cv::resizeWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x1ff8): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x200c): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2028): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2044): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2080): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2094): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x20a8): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function resize_window_cv': image_opencv.cpp:(.text+0x2114): undefined reference tocv::resizeWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x211c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2130): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x216c): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in functionmake_window': image_opencv.cpp:(.text+0x2274): undefined reference to cv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x227c): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x22b4): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x22d0): undefined reference tocv::setWindowProperty(cv::String const&, int, double)' /usr/bin/ld: image_opencv.cpp:(.text+0x22d8): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x22ec): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2328): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2344): undefined reference tocv::resizeWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x234c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2388): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x23a4): undefined reference to cv::moveWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x23ac): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x23c0): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x23f0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2404): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2418): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function show_image_cv': image_opencv.cpp:(.text+0x24ec): undefined reference tocv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x24f4): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2544): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x254c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x25f4): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2610): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x26c0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2704): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in functionshow_image_mat': image_opencv.cpp:(.text+0x277c): undefined reference to cv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2784): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x27d4): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x27dc): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x27f0): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x280c): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2848): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x285c): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function create_video_writer': image_opencv.cpp:(.text+0x2920): undefined reference tocv::VideoWriter::VideoWriter(cv::String const&, int, double, cv::Size_, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x2928): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2940): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x298c): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in functionget_capture_video_stream': image_opencv.cpp:(.text+0x2b30): undefined reference to cv::VideoCapture::VideoCapture(cv::String const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x2b38): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x2b50): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x2bbc): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function get_capture_webcam': image_opencv.cpp:(.text+0x2c08): undefined reference tocv::VideoCapture::VideoCapture(int)' /usr/bin/ld: obj/image_opencv.o: in function draw_detections_cv_v3': image_opencv.cpp:(.text+0x48e0): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x4910): undefined reference to cv::getTextSize(cv::String const&, int, double, int, int*)' /usr/bin/ld: image_opencv.cpp:(.text+0x4918): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x4b68): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x4c08): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x4c10): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x4d40): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x4d54): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in functiondraw_train_chart': image_opencv.cpp:(.text+0x5020): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x5028): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5274): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x527c): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x531c): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5398): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x53a0): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x53d0): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5458): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x5460): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x550c): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x5514): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5544): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x55d0): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x55d8): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5604): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5620): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x563c): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x56b8): undefined reference to cv::imread(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5810): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5860): undefined reference to cv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5868): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x58a4): undefined reference to cv::moveWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x58ac): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x58e8): undefined reference to cv::resizeWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x58f0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5940): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x5948): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x596c): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5988): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x59a4): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x59c0): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x59ec): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x5a40): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5a74): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5a94): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5aa4): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5ac0): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o:image_opencv.cpp:(.text+0x5ad0): more undefined references to cv::String::deallocate()' follow /usr/bin/ld: obj/image_opencv.o: in functiondraw_train_loss': image_opencv.cpp:(.text+0x5dc4): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x5dcc): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x5e60): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x5e68): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6008): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x606c): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x6074): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x60b4): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x611c): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x6124): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x61d0): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x624c): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x6254): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6294): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x62f4): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x62fc): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x64a8): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x64b0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x67e4): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x686c): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x68a0): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x68c4): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x68e0): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x6938): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x69a4): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x69ac): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x69d0): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x6a4c): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x6a54): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6ac8): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x6b50): undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x6b58): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6b98): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x6bb4): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6be8): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6c10): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6c24): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x6c34): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o:image_opencv.cpp:(.text+0x6c44): more undefined references to cv::String::deallocate()' follow /usr/bin/ld: obj/image_opencv.o: in functionblend_images_cv': image_opencv.cpp:(.text+0x700c): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7068): undefined reference tocv::error(int, cv::String const&, char const, char const, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7070): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x709c): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x70f8): undefined reference to cv::error(int, cv::String const&, char const*, char const*, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7100): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x711c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x713c): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function cv_draw_object': image_opencv.cpp:(.text+0x7614): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7648): undefined reference to cv::namedWindow(cv::String const&, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7650): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7678): undefined reference to cv::resizeWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7680): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x76c8): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x76d0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x76f8): undefined reference to cv::moveWindow(cv::String const&, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x7700): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x772c): undefined reference to cv::setMouseCallback(cv::String const&, void (*)(int, int, int, int, void*), void*)' /usr/bin/ld: image_opencv.cpp:(.text+0x7734): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7784): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x77d8): undefined reference tocv::createTrackbar(cv::String const&, cv::String const&, int, int, void ()(int, void), void)' /usr/bin/ld: image_opencv.cpp:(.text+0x77e0): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x77e8): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x78ac): undefined reference to cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /usr/bin/ld: image_opencv.cpp:(.text+0x78b4): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x78bc): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7900): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x794c): undefined reference to cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /usr/bin/ld: image_opencv.cpp:(.text+0x7954): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x795c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x799c): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x79e8): undefined reference to cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /usr/bin/ld: image_opencv.cpp:(.text+0x79f0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x79f8): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7d34): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x7d3c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7dcc): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x7dd4): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7ee4): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x7eec): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x7f58): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x7f60): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8060): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x8068): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x80f0): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x80f8): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8184): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' /usr/bin/ld: image_opencv.cpp:(.text+0x818c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x81b0): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x81cc): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x81e8): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x8204): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x8340): undefined reference tocv::rectangle(cv::Mat&, cv::Rect, cv::Scalar const&, int, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x8364): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x83b4): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x83d0): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x8794): undefined reference tocv::rectangle(cv::Mat&, cv::Rect, cv::Scalar const&, int, int, int)' /usr/bin/ld: image_opencv.cpp:(.text+0x87d8): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x87e0): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x88bc): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x88d8): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x88f4): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x8910): undefined reference tocv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x892c): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: obj/image_opencv.o:image_opencv.cpp:(.text+0x8948): more undefined references tocv::String::allocate(unsigned int)' follow /usr/bin/ld: obj/image_opencv.o: in function cv_draw_object': image_opencv.cpp:(.text+0x89f8): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8a00): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8a38): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8a70): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x8ae0): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o:image_opencv.cpp:(.text+0x8ae8): more undefined references to cv::String::deallocate()' follow /usr/bin/ld: obj/image_opencv.o: in functionshow_acnhors': image_opencv.cpp:(.text+0x91e4): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: image_opencv.cpp:(.text+0x9224): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' /usr/bin/ld: image_opencv.cpp:(.text+0x922c): undefined reference to cv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text+0x9558): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function cvflann::anyimpl::big_any_policy<cv::String>::static_delete(void**)': image_opencv.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x18): undefined reference tocv::String::deallocate()' /usr/bin/ld: obj/image_opencv.o: in function cvflann::anyimpl::big_any_policy<cv::String>::move(void* const*, void**)': image_opencv.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x10): undefined reference tocv::String::deallocate()' /usr/bin/ld: image_opencv.cpp:(.text._ZN7cvflann7anyimpl14big_anypolicyIN2cv6StringEE4moveEPKPvPS5[_ZN7cvflann7anyimpl14big_anypolicyIN2cv6StringEE4moveEPKPvPS5]+0x28): undefined reference to cv::String::deallocate()' /usr/bin/ld: obj/http_stream.o: in functionMJPG_sender::write(cv::Mat const&)': http_stream.cpp:(.text._ZN11MJPG_sender5writeERKN2cv3MatE[_ZN11MJPG_sender5writeERKN2cv3MatE]+0xe8): undefined reference to cv::String::allocate(unsigned int)' /usr/bin/ld: http_stream.cpp:(.text._ZN11MJPG_sender5writeERKN2cv3MatE[_ZN11MJPG_sender5writeERKN2cv3MatE]+0x128): undefined reference tocv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator >&, std::vector<int, std::allocator > const&)' /usr/bin/ld: http_stream.cpp:(.text._ZN11MJPG_sender5writeERKN2cv3MatE[_ZN11MJPG_sender5writeERKN2cv3MatE]+0x130): undefined reference to cv::String::deallocate()' /usr/bin/ld: http_stream.cpp:(.text._ZN11MJPG_sender5writeERKN2cv3MatE[_ZN11MJPG_sender5writeERKN2cv3MatE]+0x588): undefined reference tocv::String::deallocate()' collect2: error: ld returned 1 exit status make: *** [Makefile:168:darknet] 错误 1

I tried cmake also failed

pi@raspberrypi:~/darknet $ cmake . && make -- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
-- ZED SDK not enabled, since it requires CUDA -- Configuring done -- Generating done -- Build files have been written to: /home/pi/darknet [ 0%] Building CXX object CMakeFiles/dark.dir/src/yolo_v2_class.cpp.o c++: error: unrecognized command line option ‘-mavx’; did you mean ‘-marm’? c++: error: unrecognized command line option ‘-mavx2’ c++: error: unrecognized command line option ‘-msse3’ c++: error: unrecognized command line option ‘-msse4.1’ c++: error: unrecognized command line option ‘-msse4.2’ c++: error: unrecognized command line option ‘-msse4a’ make[2]: [CMakeFiles/dark.dir/build.make:63:CMakeFiles/dark.dir/src/yolo_v2_class.cpp.o] 错误 1 make[1]: [CMakeFiles/Makefile2:110:CMakeFiles/dark.dir/all] 错误 2 make: *** [Makefile:130:all] 错误 2

pi@raspberrypi:~/darknet $ pkg-config --modversion opencv 3.4.0

AlexeyAB commented 4 years ago
  1. Don't set AVX=1 in the Makefile for compiling on RPi. Set AVX=0

  2. Try to use Cmake for compilation:

    cmake .
    make
x12901 commented 4 years ago
  1. Don't set AVX=1 in the Makefile for compiling on RPi. Set AVX=0
  2. Try to use Cmake for compilation:
cmake .
make

Thanks, I changed the version of opencv and it worked!

fycie commented 1 year ago

你好,请问你也是opencv4不兼容吗