首页 > 代码库 > ubuntu 11.10 (64bit) install opencv 2.4.8 and run in Qtcreator

ubuntu 11.10 (64bit) install opencv 2.4.8 and run in Qtcreator

install gtk2+ sudo apt-get install libgtk2.0*
sudo apt-get install cmake-qt-gui

tar xzvf opencv-2.4.8.tar.gz

mkdir build in the ~ dir the opencv-2.4.8 in the same ~ dir run cmake-qt-gui

cd to the build dir run make if the error (2.4.8)error:   /opencv248/opencv-2.4.8/cmake/cl2cpp.cmake:50 (string):   string does not recognize sub-command MD5 occur

just uncommentthe cl2cpp.cmake file in line 50 and  make again sudo make install

make a new file named opencv.conf

nano /etc/ld.so.conf.d/opencv.conf

and add the content

/usr/local/lib

run the following commend

sudo ldconfig

 

add the follow to the end of your ~/.bashrc file
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

and run commend

source ~/.bashrc

 

wget http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-linux-opensource-5.0.2-x86-offline.run chmod +x qt-linux-opensource-5.0.2-x86-offline.run ./qt-linux-opensource-5.0.2-x86-offline.run

sudo apt-get install build-essential

sudo apt-get install mesa-common-dev

sudo apt-get install libglu1-mesa-dev -y

sudo apt-get install mesa-common-dev

 

<script type="text/javascript" src="https://gist.github.com/wzyuliyang/14e15b38a58c797e1f03.js"></script>

ubuntu 11.10 (64bit) install opencv 2.4.8 and run in Qtcreator