全部博文(103)
分类: LINUX
2015-01-16 16:12:13
g++ Image.cpp -o image `pkg-config --cflags --libs opencv` (注意ESC下面的`,不是单引号)
./image lena.jpg
方法2:
借助cmake 需要写CMakeLists.txt,如下:
cmake_minimum_requried(VERSION 2.8)
project(Hello)
find_packetage(OpenCV REQUIRED)
add_executable(hello image.cpp)
target_link_libraries(Hello $({OenCV_LIBS}))
然后:
cmake .
make