Skip to content

Instantly share code, notes, and snippets.

@rajatsaxena
Created February 28, 2017 13:01
Show Gist options
  • Save rajatsaxena/ba1152320cd4e7a78a61de066de02328 to your computer and use it in GitHub Desktop.
Save rajatsaxena/ba1152320cd4e7a78a61de066de02328 to your computer and use it in GitHub Desktop.
----------------------------------------------------------------------------------
g++ -o test_1 test_1.cpp `pkg-config opencv --cflags --libs`
---------------------------------- using gcc and cmake ----------------------------------
* Create a cmake file CMakeLists.txt
* Add the following to cmake file
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
add_executable( DisplayImage DisplayImage.cpp )
target_link_libraries( DisplayImage ${OpenCV_LIBS} )
* Run this in the terminal
cd <DisplayImage_directory>
cmake .
make
-------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment