Ask Your Question
0

how to run c++ program on mac os x with terminale

asked 2017-09-13 06:56:41 -0600

tocca gravatar image

Hi i don't know how to run a program like this: image description

how can i run this program with terminale?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2017-09-13 14:23:37 -0600

Lorenzo Riano gravatar image

I think the easiest way is to create a cmake project and compile your program using cmake. Details are at http://docs.opencv.org/trunk/db/df5/t... (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 .
make
./DisplayImage
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-13 06:56:41 -0600

Seen: 260 times

Last updated: Sep 13 '17