Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error: No such file or directory?

Newbie question here. I'm new to Linux and OpenCV/CMake, and I've just succesfully followed the steps in http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html to install OpenCV on Linux.

However, when I tried to run the sample program in the next tutorial (http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html#linux-gcc-usage), running "cmake ." in my project directory seems to work as it should, but when I try "make" afterwards, I get the error: "c++: error: $/usr/local/include: No such file or directory"

My DisplayImage.cpp file is identical to the one on the website, and my CMakeLists.txt looks like below:

cmake_minimum_required(VERSION 2.8)
project(DisplayImage)
find_package(OpenCV REQUIRED)
add_executable(DisplayImage DisplayImage.cpp)
target_link_libraries(DisplayImage "$/usr/local/include")

Can anyone help me with this?

click to hide/show revision 2
retagged

updated 2014-09-08 02:09:19 -0500

berak gravatar image

Error: No such file or directory?

Newbie question here. I'm new to Linux and OpenCV/CMake, and I've just succesfully followed the steps in http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html to install OpenCV on Linux.

However, when I tried to run the sample program in the next tutorial (http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html#linux-gcc-usage), running "cmake ." in my project directory seems to work as it should, but when I try "make" afterwards, I get the error: "c++: error: $/usr/local/include: No such file or directory"

My DisplayImage.cpp file is identical to the one on the website, and my CMakeLists.txt looks like below:

cmake_minimum_required(VERSION 2.8)
project(DisplayImage)
find_package(OpenCV REQUIRED)
add_executable(DisplayImage DisplayImage.cpp)
target_link_libraries(DisplayImage "$/usr/local/include")

Can anyone help me with this?