GOTURN
GOTURN copied to clipboard
cmake has errors:
I set the path of opencv in CMakeList.txt as following:
#find_package( OpenCV REQUIRED )
set(OpenCV_LIBS "/cluster/6.2/opencv/2.4.10/lib/")
set(OpenCV_INCLUDE_DIRS "/cluster/6.2/opencv/2.4.10/include")
set(OpenCV_VERSION "2.4.10")
message("Open CV version is ${OpenCV_VERSION}")
After cmake .., I have the following warnings:
WARNING: Target "save_videos_vot" requests linking to directory "/cluster/6.2/opencv/2.4.10/lib/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "save_videos_vot" requests linking to directory "/MyCaffe/caffe-version-rc3/build/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_alov" requests linking to directory "/cluster/6.2/opencv/2.4.10/lib/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_alov" requests linking to directory "/MyCaffe/caffe-version-rc3/build/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_alov" requests linking to directory "/cluster/6.2/opencv/2.4.10/lib/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_alov" requests linking to directory "/MyCaffe/caffe-version-rc3/build/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_imagenet" requests linking to directory "/cluster/6.2/opencv/2.4.10/lib/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "show_imagenet" requests linking to directory "/MyCaffe/caffe-version-rc3/build/lib". Targets may
WARNING: Target "train" requests linking to directory "/cluster/6.2/opencv/2.4.10/lib/". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: /MyCaffe/GOTURN/build
Then I try to make it: [@gpu build]$ make It gives me the following errors:
Scanning dependencies of target GOTURN
[ 3%] Building CXX object CMakeFiles/GOTURN.dir/src/helper/bounding_box.cpp.o
In file included from /MyCaffe/GOTURN/src/helper/bounding_box.cpp:1:0:
/MyCaffe/GOTURN/src/helper/bounding_box.h:6:23: fatal error: opencv/cv.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/GOTURN.dir/src/helper/bounding_box.cpp.o] Error 1
(The name "gpu" occasionally causes notifications in projects of which I didn't even know that they existed....)
Until the project owners give a more detailed answer: The line
set(OpenCV_LIBS "/cluster/6.2/opencv/2.4.10/lib/")
is certainly wrong. You're setting the OpenCV_LIBS
variable to point to a directory. But this variable is supposed to be a list of library names. (Roughly something like cvFoo.lib cvBar.lib cvWhatever.lib
- a list of library names).
These should be set properly when using the find script via the
find_package( OpenCV REQUIRED )
line that you commented out. I'm not a CMake expert and not familiar with OpenCV, so I can't point you to the right FindOpenCV.cmake
file, but things like http://stackoverflow.com/questions/8711109/could-not-find-module-findopencv-cmake-error-in-configuration-process (pointing to https://github.com/opencv/opencv/tree/master/cmake ) or websearches for FindOpenCV.cmake
might be a start...
@gpu Thanks for your help. I add set(OpenCV_LIBS "/cluster/6.2/opencv/2.4.10/lib/libopencv_core.so")
, and it solved the error of FindOpenCV.cmake
.
@RyanCV This is wrong, set (OpenCV_LIBS /cluster/6.2/opencv/2.4.10/lib/libopencv_core.so)