Saturday, November 13, 2010

OpenCV - link libraries and compile

#the source directory would change depending on where you install it

#output errors while compiling are very useful to debug
export LD_LIBRARY_PATH=/usr/src/opencv/release/lib/:$LD_LIBRARY_PATH
ldconfig
PKG_CONFIG_PATH=/usr/src/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH
ldconfig

#some examples and guidelines here
linuxconfig.org/introduction-to-computer-vision-with-opencv-on-linux

#compiling
g++ `pkg-config opencv --cflags --libs` example21.cpp -o example21

No comments:

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.