Star-Clouds/CenterFace

prj-opencv-cpp中C++调用的问题

Casi11as opened this issue · 1 comments

根据prj-opencv-cpp中编译后,运行build/demo测试成功,但是编译demo.cpp报错
In file included from demo.cpp:3:0: cpp/cv_dnn_centerface.h:17:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] }; ^ /tmp/ccvuKSBX.o: In function main':
demo.cpp:(.text+0xc0): undefined reference to Centerface::Centerface(std::string, int, int)' demo.cpp:(.text+0x154): undefined reference to Centerface::detect(cv::Mat&, std::vector<FaceInfo, std::allocator >&, float, float)'
demo.cpp:(.text+0x477): undefined reference to Centerface::~Centerface()' demo.cpp:(.text+0x4f9): undefined reference to Centerface::~Centerface()'
demo.cpp:(.text+0x5aa): undefined reference to Centerface::~Centerface()' collect2: error: ld returned 1 exit status

opencv 3.4.15可运行

已解决