Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think the easiest way is to create a cmake project and compile your program using cmake. Details are at (it refers to Linux and gcc, but it's the same on Mac).

Just create a CmakeLists.txt (provided your file is called DisplayImage.cpp):

cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable( DisplayImage DisplayImage.cpp )
target_link_libraries( DisplayImage ${OpenCV_LIBS} )

and then compile your program:

cmake .