我有以下配置:
我试图用TBB安装OpenCV。我下载了英特尔TBB 2017 Update 4并以正确的方式设置了每条路径。
我之前构建(当然)TBB库,然后以这种方式将其添加到CMake中:
mingw32-make compiler=gcc arch=ia64
我在系统变量中添加以下路径:
C:\tbb-2017\include
C:\tbb-2017\build\windows_intel64_gcc_mingw6.3.0_release
但是当我使用CMake编译时出现此错误:
C:\opencv3\release>mingw32-make -j8
[ 1%] Built target zlib[ 1%] [ 1%] [ 1%] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj[ 1%]
Building CXX object modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.objBuilding CXX object modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj
[ 4%] Built target libjpeg
[ 6%] Built target libjasper
Building CXX object modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj
[ 6%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_px.obj
[ 6%] Built target opencv_perf_core_pch_dephelp
[ 6%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj
[ 7%] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
Scanning dependencies of target opencv_flann_pch_dephelp
In file included from C:/opencv3/opencv-master/modules/core/src/precomp.hpp:55:0,
from C:\opencv3\release\modules\core\opencv_core_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
cIn file included from C:/opencv3/opencv-master/modules/imgproc/src/precomp.hpp:50:0,
from C:\opencv3\release\modules\imgproc\opencv_imgproc_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
oIn file included from C:/opencv3/opencv-master/modules/ts/src/precomp.hpp:2:0,
from C:\opencv3\release\modules\ts\opencv_ts_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
cmIn file included from C:/opencv3/opencv-master/modules/videoio/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\videoio\opencv_videoio_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
ocpcmoi[ 7%] lmoBuilding CXX object modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj
ppmaiiptlIn file included from C:/opencv3/opencv-master/modules/imgcodecs/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\imgcodecs\opencv_imgcodecs_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
liiacalototanimit opoitninoe l nrtat metetirirenmomrainimtn nieatandteta.eret
mddei..dn
.a
tedmodules\core\CMakeFiles\opencv_core_pch_dephelp.dir\build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj' failed
.mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj] Error 1
modules\imgproc\CMakeFiles\opencv_imgproc_pch_dephelp.dir\build.make:62: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj' failed
modules\ts\CMakeFiles\opencv_ts_pch_dephelp.dir\build.make:62: recipe for target 'modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.obj' failed
CMakeFiles\Makefile2:2216: recipe for target 'modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/all' failed
modules\videoio\CMakeFiles\opencv_videoio_pch_dephelp.dir\build.make:62: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj] Error 1
mingw32-make[2]: *** [modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.obj] Error 1
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/all] Error 2
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
CMakeFiles\Makefile2:8292: recipe for target 'modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/all' failed
modules\imgcodecs\CMakeFiles\opencv_imgcodecs_pch_dephelp.dir\build.make:62: recipe for target 'modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_pch_dephelp.cxx.obj' failed
mingw32-make[1]: *** [modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/all] Error 2
mingw32-make[2]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2867: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/all] Error 2
CMakeFiles\Makefile2:7513: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/all] Error 2
CMakeFiles\Makefile2:6906: recipe for target 'modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/highgui/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\highgui\opencv_highgui_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\highgui\CMakeFiles\opencv_highgui_pch_dephelp.dir\build.make:62: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:8085: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/core/test/test_precomp.hpp:17:0,
from C:\opencv3\release\modules\core\opencv_test_core_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\core\CMakeFiles\opencv_test_core_pch_dephelp.dir\build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2360: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/flann/src/precomp.hpp:23:0,
from C:\opencv3\release\modules\flann\opencv_flann_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\flann\CMakeFiles\opencv_flann_pch_dephelp.dir\build.make:62: recipe for target 'modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2617: recipe for target 'modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
C:\opencv3\release>
你能帮助我吗?
我将CNA从ENABLE_PRECOMPILED_HEADERS标志从ON更改为OFF并且每件事都有效......
答案 0 :(得分:1)
我将CNA从ENABLE_PRECOMPILED_HEADERS标志从ON更改为OFF并且每件事都有效......