Ask Your Question

Install TBB + OpenCV + Qt

asked 2013-04-10 12:07:30 -0600

isaacenrique gravatar image


I have several weeks trying to install OpenCV 2.4 + TBB 4.1 + QT5 on Windows 7 and can not.

I perform the following steps (in the order they are listed):

(1) I install QT5, specifically: Qt 5.0.2 for Windows 32-bit (MinGW 4.7). This I download from

After installation, I add "C:\Qt\Qt5.0.1\Tools\MinGW\bin" to the PATH environment variable (I'm not sure this is necessary or at least helpful).

(2) I downloaded (from and built TBB 4.1 (Source), specifically: tbb41_20130314oss_src.tgz

I extract this in the path "C:\TBB" and built it with: mingw32-make compiler=gcc arch=ia32

Then I add the system environment variable

"TBBDIR = C:\tbb\tbb41_20130314oss"

and add "%TBBDIR%\build\windows_ia32_gcc_mingw4.7.2_release" to the PATH environment variable. (again, I'm not sure this is necessary or at least helpful)

(3) I downloaded OpenCV (in the path C:\opencv\source) using msysgit + TortoiseGit (following this tutorial

(4) Then build OpenCV using CMake

I do a debug (putting CMAKE_BUILD_TYPE = Debug) in the path "C:\opencv\builds\debug" and then a release (putting CMAKE_BUILD_TYPE = Release) in the path "C:\opencv\builds\release".

In both cases I check the options WITH_QT and WITH_TBB and uncheck WITH_CUBLAS, WITH_CUDA, WITH_EIGEN and WITH_CUFFT.

After that I open a command console, I move to the path "C:\opencv\builds\debug" (where the project debugging) and run the following command:


When the process goes to 33% completion, I get the following error message:

Linking CXX shared library .. \ .. \ bin \ libopencv_core249d.dll c :/ qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686 -w64-mingw32/bin/ld.exe: can not find-ltbb collect2.exe: error: ld returned 1 exit status modules \ core \ CMakeFiles \ opencv_core.dir \ build.make: 740: recipe for target `bin / l ibopencv_core249d.dll 'failed mingw32-make [2]: * [bin/libopencv_core249d.dll] Error 1 CMakeFiles \ Makefile2: 1084: recipe for target 'modules / core / CMakeFiles / opencv_cor e.dir / all 'failed mingw32-make [1]: [modules / core / CMakeFiles / opencv_core.dir / all] Error 2 Makefile: 115: recipe for target 'all' failed mingw32-make: ** [all] Error 2

I really do not know what the cause of this problem or how I can fix it (at least a few options). Thanks in advance for any help and/or suggestions.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-04-11 05:11:12 -0600

You tries to build OpenCV from Master branch. It is in unstable state now. Use branch 2.4. It is base branch for all releases in 2.4.x seria.

edit flag offensive delete link more


You fork all branches on Github. You need just to checkout branch 2.4 in your workspace with "git checkout -b 2.4 origin/2.4" command.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-04-13 10:52:31 -0600 )edit

Question Tools


Asked: 2013-04-10 12:07:30 -0600

Seen: 3,553 times

Last updated: Apr 11 '13