Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem linking opencv nonfree libraries #61

Open
gntoni opened this issue Jan 30, 2017 · 0 comments
Open

Problem linking opencv nonfree libraries #61

gntoni opened this issue Jan 30, 2017 · 0 comments

Comments

@gntoni
Copy link

gntoni commented Jan 30, 2017

When compiling the code using openCV 2.4, I came across the following error:

CMakeFiles/camodocal_dvision.dir/SurfSet.cpp.o: In function `DVision::SurfSet::extract(cv::Mat const&, CvSURFParams const&)':
SurfSet.cpp:(.text+0x14af): undefined reference to `cv::SURF::SURF(double, int, int, bool, bool)'
SurfSet.cpp:(.text+0x163d): undefined reference to `cv::SURF::operator()(cv::_InputArray const&, cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_OutputArray const&, bool) const'
SurfSet.cpp:(.text+0x1803): undefined reference to `VTT for cv::SURF'
CMakeFiles/camodocal_dvision.dir/SurfSet.cpp.o: In function `DVision::SurfSet::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, CvSURFParams const&)':
SurfSet.cpp:(.text+0x1d63): undefined reference to `cv::SURF::SURF(double, int, int, bool, bool)'
SurfSet.cpp:(.text+0x1ee1): undefined reference to `cv::SURF::operator()(cv::_InputArray const&, cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::_OutputArray const&, bool) const'
SurfSet.cpp:(.text+0x208f): undefined reference to `VTT for cv::SURF'
CMakeFiles/camodocal_dvision.dir/SurfSet.cpp.o: In function `cv::SURF::~SURF()':
SurfSet.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x10): undefined reference to `VTT for cv::SURF'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libcamodocal_dvision.so] Error 1
make[1]: *** [src/dbow2/DVision/CMakeFiles/camodocal_dvision.dir/all] Error 2
make: *** [all] Error 2

It is a linking problem with the opencv nonfree libraries, I solved it by adding "opencv_nonfree" to target link libraries in camodocal/src/dbow2/DVision/CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant