1
votes

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.

2

2 Answers

1
votes

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.

0
votes

obj ? no. lib, yes

so, please make sure, you got 'C:\OpenCV2.2\lib\opencv_calib3d220d.lib' etc in your linker input.

also make sure you do the same WITHOUT the 'd' at the end for release

btw, might be a good idea to update to 2.4.6, heap of bug fixes, proper gpu support , facerecognition, do you really want to live without ?