C++ – fatal error LNK1104: cannot open file ‘opencv_calib3d220d.obj’

copencvvisual studio 2010

I am very new to C++ programming and I am compiling a code in visual studio 2010 with opencv 2.2 library on a Windows 7-64 bit OS using a precompiled header. I listed all the library files available in C:\OpenCV2.2\lib in the Project properties>configuration properties>linker>input, but when I run the program it continues to show this error:

fatal error LNK1104: cannot open file 'opencv_calib3d220d.obj',

although I defined 'C:\OpenCV2.2\lib\opencv_calib3d220d' as an input.
I do not know how to resolve the problem.
Any help would be highly appreciated.

Best Answer

Did you actually define "C:\OpenCV2.2\lib\opencv_calib3d220d" as the input, or "C:\OpenCV2.2\lib\opencv_calib3d220d .lib"? (No space, can't bold/italics it without the space is why it's there.)

It needs to have that .lib there or it won't work. Even if it's complaining about a .obj

Also: Under Linker-> General -> Additional Library Directories you can put "C:\OpenCV2.2\lib\" and then you won't have to type out the directory each time you add something from that directory to Linker -> Input -> Additional Dependancies : You could just put "opencv_calib3d220d.lib", for example.

Related Topic