VS 2013: Cannot open include file: 'tbb/tbb.h': No such file or directory

asked 2017-01-10 17:02:53 -0500

KevinLucidyne gravatar image

updated 2017-01-11 16:08:53 -0500

I'm trying to build OpenCV 3.2 with CUDA and TBB enabled. I've followed the usual directions and generated my solution with CMake. When I try to build opencv_world in Visual Studio 2013 I get the NVCC error on cuda_compile_generated_median_filter.cu.obj:

fatal error C1083: Cannot open include file: 'tbb/tbb.h': No such file or directory

The include path is correct for the TBB package. I can Ctrl-Shift-G on the include tbb and it navigates to the tbb.h file. I've restarted the machine. But the compile still fails.

Previously to trying to compile opencv with TBB I successfully compiled opencv without TBB. The problem is that the TBB include file is not being entered into cuda_compile_generated_median_filter.cu.obj.depend and isn't in the dependency files upstream.

I'm using Intel's TBB binary so in CMake I have BUILD_TBB unchecked, WITH_TBB checked as well as TBB_ENV* and TBB_VER_FILE all set to the correct directories and files.

I've also tried re-configuring and re-generating the Cmake files to no avail. What do I do now?

Another difficulty I'm running into is that the compiles in VS 2013 are taking a heinous amount of time. Is there a way to run the CMake from the Windows command prompt which seems to be faster?

edit retag flag offensive close merge delete

Comments

Can you compile opencv without opencv_world checked ?

LBerger gravatar imageLBerger ( 2017-01-11 01:49:00 -0500 )edit

@LBerger thanks for replying. I've added additional info above.

KevinLucidyne gravatar imageKevinLucidyne ( 2017-01-11 16:09:56 -0500 )edit

You don't answer have you try to build without opencv_world but with tbb?

About time to compile CUDA see this post

LBerger gravatar imageLBerger ( 2017-01-11 16:13:33 -0500 )edit

I'm not building TBB, I'm using the Intel TBB binaries.

KevinLucidyne gravatar imageKevinLucidyne ( 2017-01-11 16:17:55 -0500 )edit

you wrote "I try to build opencv_world" disable opencv_world. You will have a dll for each module and may be no mistake.

About AMD you can read this post too

LBerger gravatar imageLBerger ( 2017-01-12 02:17:48 -0500 )edit

Yes OpenCV.sln builds with opencv_world, INSTALL and PACKAGE disabled

KevinLucidyne gravatar imageKevinLucidyne ( 2017-01-12 12:09:01 -0500 )edit

Did you get any further regarding this issue? I am trying the same thing on VS15 and getting the same error. I am also trying to build OpenCV 3.2 with CUDA 8.0 and Caffe, but I am getting this error when I try to build the solution in VS:

LNK1104: cannot open file '..\..\lib\Debug\opencv_world320d.lib

I find this particularly weird since I have successfully compiled OpenCV 3.2 with CUDA 8.0 before on the same machine (Windows 10 + GTX970).

ThorbjornSomod gravatar imageThorbjornSomod ( 2017-02-22 05:08:49 -0500 )edit