【发布时间】:2013-12-03 03:09:11
【问题描述】:
我在这个目录中有一些静态库 >> /home/mycomputer/src/lib 。 名称 liba.a libb.a libc.a libd.a 我在 /home/sugonsky/src 上有代码 名称代码.cpp
我已经尝试在 g++ 上编译它 命令是
g++ code.cpp -o myExecutable -L/home/mycomputer/src/lib/liba.a -L/home/mycomputer/src/lib/libb.a -L/home/mycomputer/src/lib/libc.a -L/home/mycomputer/src/lib/libd.a
我想说的是为什么我总是得到
/tmp/ccJLJTpi.o: In function `cv::Mat::operator()(cv::Rect_<int> const&) const':
faceDetection.cpp:(.text._ZNK2cv3MatclERKNS_5Rect_IiEE[_ZNK2cv3MatclERKNS_5Rect_IiEE]+0x27): undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)'
collect2: 错误:ld 返回 1 个退出状态
我的编译方案有什么错误的步骤吗?
【问题讨论】:
标签: c++ opencv compilation static-linking