Error: No such file or directory?

asked 2014-09-08 02:05:45 -0500

potatoprogrammer gravatar image

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

berak gravatar image

Newbie question here. I'm new to Linux and OpenCV/CMake, and I've just succesfully followed the steps in to install OpenCV on Linux.

However, when I tried to run the sample program in the next tutorial (, 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)
find_package(OpenCV REQUIRED)
add_executable(DisplayImage DisplayImage.cpp)
target_link_libraries(DisplayImage "$/usr/local/include")

Can anyone help me with this?

edit retag flag offensive close merge delete



target_link_libraries(DisplayImage ${OpenCV_LIBS} ) // not "$/usr/local/include"

berak gravatar imageberak ( 2014-09-08 02:07:41 -0500 )edit

Oh wow, I feel silly now, lol. Thanks.

potatoprogrammer gravatar imagepotatoprogrammer ( 2014-09-08 10:32:43 -0500 )edit