OpenCV and VS2010: Fatal error LNK1104: atal error LNK1104: cannot open file ‘tbb_debug.lib

opencvvisual studio 2010

I tried following this guide to install OpenCV with Visual Studio C++ 2010 (using Windows 7 64-bit): Installing OpenCV 2.4.3 in Visual C++ 2010 Express

I am using OpenCV-2.4.2 and have therefore changed all the Additional Dependencies, e.g. from "opencv_calib3d240d.lib" to "opencv_calib3d242d.lib".

However, I get the following error when I try to run the example code for displaying an image:

<quote>1>LINK : fatal error LNK1104: cannot open file 'tbb_debug.lib'</quote>

I have tried switching the folders from "ia32" to "intel64". I have also tried to add "tbb_debug.lib" to "Additional Dependencies" in Linker->Input.

Another thing: the location of OpenCV is on another harddrive (D:) than my OS and VS (C:), but I assume this shouldn't make a difference [edit: I have moved to C:, but still get the same problem.]

Thanks in advance!

Best Answer

I've had this problem and Change Common Language Runtime Support (/clr) to No Common Language Runtime Support in Configuration properties-> General->Common Language Runtime. its works successfully.