在Netbeans 8.0中构建包含OpenCV的ROS节点会导致未定义的引用

时间:2015-06-29 15:19:03

标签: c++ opencv netbeans netbeans-8 ros

我正在尝试编译包含OpenCV 3.0代码的ROS(indigo)节点的代码。我的同事的这个节点在Ubuntu 14.04上的Eclipse中编译得非常好但是当我尝试在Netbeans(8.0.2)中编译它时会抛出以下错误:

Linking CXX executable devel/lib/lsvo/tft_estimation
CMakeFiles/tft_estimation.dir/src/tft_test.cpp.o: In function `drawMatches(std::vector<Eigen::Matrix<double, -1, 1, 0, -1, 1>, std::allocator<Eigen::Matrix<double, -1, 1, 0, -1, 1> > > const&, std::vector<Eigen::Matrix<double, -1, 1, 0, -1, 1>, std::allocator<Eigen::Matrix<double, -1, 1, 0, -1, 1> > > const&, std::vector<Eigen::Matrix<double, -1, 1, 0, -1, 1>, std::allocator<Eigen::Matrix<double, -1, 1, 0, -1, 1> > > const&)':
tft_test.cpp:(.text+0xbcf): undefined reference to `cv::String::allocate(unsigned long)'
tft_test.cpp:(.text+0xc6a): undefined reference to `cv::imread(cv::String const&, int)'
tft_test.cpp:(.text+0xc96): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0xcb7): undefined reference to `cv::String::allocate(unsigned long)'
tft_test.cpp:(.text+0xd52): undefined reference to `cv::imread(cv::String const&, int)'
tft_test.cpp:(.text+0xd7e): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0xd9f): undefined reference to `cv::String::allocate(unsigned long)'
tft_test.cpp:(.text+0xe3a): undefined reference to `cv::imread(cv::String const&, int)'
tft_test.cpp:(.text+0xe66): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0x1157): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
tft_test.cpp:(.text+0x11e6): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
tft_test.cpp:(.text+0x1276): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
tft_test.cpp:(.text+0x1445): undefined reference to `cv::String::allocate(unsigned long)'
tft_test.cpp:(.text+0x146a): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
tft_test.cpp:(.text+0x1474): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0x1535): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0x1551): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0x1572): undefined reference to `cv::String::deallocate()'
tft_test.cpp:(.text+0x1596): undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
make[2]: *** [devel/lib/lsvo/tft_estimation] Error 1
make[1]: *** [CMakeFiles/tft_estimation.dir/all] Error 2
make: *** [all] Error 2

我觉得这在某种程度上是正确连接openCV库的问题,但我不知道如何做到这一点,因为&#34;链接&#34;菜单在Netbeans 8.0中消失了。

0 个答案:

没有答案