Open inthewaytolearn opened 4 years ago
是不是gcc换成g++,再增加-std=c++11
@lengchenyu Even if you just write a "hello world" code in hello.cpp
file, and compile it with gcc: gcc hello.cpp
, it will also give error. You have to use g++ or clang++ instead of gcc to compile a .cpp
file.
gcc det.cpp -lncnn -o det -I /usr/local/include/opencv4 -I /home/lcy/ncnn_test/build/install/include/ncnn -L /home/lcy/ncnn_test/build/install/lib -L /usr/local/lib
i use this command to compile my own c++ code, but comiplie failed.
it throws out that this error. undefined reference to some operator