LBD_Descriptor
LBD_Descriptor copied to clipboard
Linking error
[100%] Linking CXX executable TestLineMatchingAlgorithm
CMakeFiles/TestLineMatchingAlgorithm.dir/TestLineMatchingAlgorithm.cpp.o: In function main': TestLineMatchingAlgorithm.cpp:(.text.startup+0x101): undefined reference to
cv::imread(cv::String const&, int)'
TestLineMatchingAlgorithm.cpp:(.text.startup+0x211): undefined reference to cv::imread(cv::String const&, int)' TestLineMatchingAlgorithm.cpp:(.text.startup+0x877): undefined reference to
cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator
How to solve this problem?
hello. I solved this problem by modifying the opencv version. Because I installed two versions of opencv,the one is opencv-2.4.9,the other one is opencv-3.1.0.
Resolvent:
Modify cmakelist.txt: add :set(OpenCV_DIR "/home/wj/opencv-3.1.0/build/") //this is your opencv-3.1.0's position find_package( OpenCV REQUIRED ) TARGET_LINK_LIBRARIES(LineMatchingLib ${OpenCV_LIBS} )