You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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} )
[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 > const&)'TestLineMatchingAlgorithm.cpp:(.text.startup+0x910): undefined reference to `cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/TestLineMatchingAlgorithm.dir/build.make:95: recipe for target 'TestLineMatchingAlgorithm' failed
make[2]: *** [TestLineMatchingAlgorithm] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/TestLineMatchingAlgorithm.dir/all' failed
make[1]: *** [CMakeFiles/TestLineMatchingAlgorithm.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
How to solve this problem?
The text was updated successfully, but these errors were encountered: