Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have met the same problem, I search it the whole morning and solve it by re-install the OpenCV. My opencv was the version 2.4.9, and build on the Ubuntu 12.04 system following the post , I installed the QT creator later using the Linux installer. The version of QT creator is 3.1.2 based on the QT 5.3.1. My OpenCV was installed on a customized path. I just deleted the build folder

cd opencv-2.4.9
rm -r build

and I just build the OpenCV again without the -D WITH_QT flag in cmake

mkdir build
cd build
cmake -D WITH_XINE=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=ON ..
make -j4
sudo make install

the -j4 flag in the make means that make in 4 cores parallel. and the Magic happens, the code works! the reason why it does not work is that when using the cmake WITH_QT flag the system build the opencv using the system default version of the qt, which is not compatible with the newest version of the qt downloaded from the website. however, to make it work, we must have the right version of the QT