How to install opencv with tbb enabled using mingw

南楼画角 提交于 2019-11-28 22:08:12

I had the same problem, the following worked out for removing the tbb linking error:

(Assuming you have already built tbb, as you are already explaining in your question)

  • From CMake, configure one time OpenCV

  • Enable WITH_TBB, be careful not enabling BUILD_TBB: the automatic downloading and building of OpenCV failed miserably for me despite many efforts. If you had previously enabled BUILD_TBB, my suggestion is to restart from the beginnning, clearing cmake cache.

  • Configure a second time OpenCV

  • Now some variables should appear: TBB_INCLUDE_DIRS. For me I set the following values (respectively):

    tbb41_20130314oss/include

  • 2 new variables appears: TBB_STDDEF_PATH and TBB_LIB_DIR. They are assigned some apparently reasonable values. For me, TBB_STDDEF_PATH was correct, but TBB_LIB_DIR was not! So I corrected it to be:

    tbb41_20130314oss/build/windows_ia32_gcc_mingw4.8.1_release

    and I left TBB_STDDEF_PATH as it was:

    tbb41_20130314oss/include/tbb/tbb_stddef.h

  • Configure a third time

  • Finally, click Generate, and you are ready to build mingw32-make -j7

  • Once you start using the opencv library, make sue the tbb DLLs are in your path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!