4

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!

Community
  • 1
  • 1
Wikzo
  • 170
  • 2
  • 12
  • Post how you specified your library directories. – Tae-Sung Shin Sep 27 '12 at 00:33
  • Here they are: VC++ Directories - Include Directories: C:\opencv\build\include;$(IncludePath) VC++ Directories - Library Directories: C:\opencv\build\x86\vc10\lib;$(LibraryPath) C/C++ General - Additional Include Directories: C:\opencv\build\common\tbb\ia32\vc10 Linker General - Additional Library Directories: C:\opencv\build\common\tbb\ia32\vc10 – Wikzo Sep 27 '12 at 09:08
  • Linker Input: opencv_calib3d242d.lib opencv_contrib242d.lib opencv_core242d.lib opencv_features2d242d.lib opencv_flann242d.lib opencv_gpu242d.lib opencv_haartraining_engined.lib opencv_highgui242d.lib opencv_imgproc242d.lib opencv_legacy242d.lib opencv_ml242d.lib opencv_nonfree242d.lib opencv_objdetect242d.lib opencv_photo242d.lib opencv_stitching242d.lib opencv_ts242d.lib opencv_video242d.lib opencv_videostab242d.lib tbb_debug.lib – Wikzo Sep 27 '12 at 09:15
  • Linker - Command Line: /OUT:"C:\Users\Wikzo\Desktop\Procedural Programming\OpenCVtest\2nd try\OpenCV_test2\Debug\OpenCV_test2.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\opencv\build\common\tbb\ia32\vc10" "opencv_calib3d242d.lib" "opencv_contrib242d.lib" "opencv_core242d.lib" "opencv_features2d242d.lib" "opencv_flann242d.lib" "opencv_gpu242d.lib" – Wikzo Sep 27 '12 at 09:17
  • Linker - Command Line (cont.): "opencv_haartraining_engined.lib" "opencv_highgui242d.lib" "opencv_imgproc242d.lib" "opencv_legacy242d.lib" "opencv_ml242d.lib" "opencv_nonfree242d.lib" "opencv_objdetect242d.lib" "opencv_photo242d.lib" "opencv_stitching242d.lib" – Wikzo Sep 27 '12 at 09:17
  • Linker - Command Line (cont.): "opencv_ts242d.lib" "opencv_video242d.lib" "opencv_videostab242d.lib" "tbb_debug.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /MANIFEST /ManifestFile:"Debug\OpenCV_test2.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" – Wikzo Sep 27 '12 at 09:18
  • Linker - COmmand Line (cont.): /DEBUG /PDB:"C:\Users\Wikzo\Desktop\Procedural Programming\OpenCVtest\2nd try\OpenCV_test2\Debug\OpenCV_test2.pdb" /ASSEMBLYDEBUG /PGD:"C:\Users\Wikzo\Desktop\Procedural Programming\OpenCVtest\2nd try\OpenCV_test2\Debug\OpenCV_test2.pgd" /TLBID:1 /DYNAMICBASE /FIXED:NO /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE – Wikzo Sep 27 '12 at 09:19
  • This is the LAST COMMENT: First, I am sorry for posting so many comments, but there is a character limit. Second, I don't know how to properly format my text, sorry. – Wikzo Sep 27 '12 at 09:19
  • You could've added these comments on your answer. :-) – Tae-Sung Shin Sep 27 '12 at 12:34

1 Answers1

3

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.

Hamid
  • 1,493
  • 2
  • 18
  • 32
  • Actually, not for me. Can you help here http://stackoverflow.com/questions/16184641/opencv-2-4-fatal-error-lnk1104-cannot-open-file-tbb-debug-lib ? – PeakGen Apr 24 '13 at 07:07