PeakGen
PeakGen

Reputation: 23035

cannot open input file 'opencv_calib3d243d.lib'

I get the following error in OpenCV

1>------ Build started: Project: OpenCv, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1181: cannot open input file 'opencv_calib3d243d.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am using MS Visual Studio 2010 express, and OpenCV version 2.4.0. I followed the following instruction when configuring OpenCV, and testing with the code supplied.

Installing OpenCV 2.4.3 in Visual C++ 2010 Express

Why I am getting this error? Please help!

Upvotes: 4

Views: 29232

Answers (4)

Rahul Sood
Rahul Sood

Reputation: 109

I solved this by adding whole path name. To do this, go to:

  1. Property Manager
  2. Linker
  3. General
  4. Additional Library Directries
  5. paste the full path of your files

... also go to "Enable Incrimental Linking" and select "NO"

Upvotes: 0

camilo.forero
camilo.forero

Reputation: 600

I had the same problem. Even if I did everything right in the .props file, the project itself was not importing the OpenCV lib directory. I solved that by right clicking the project file and going Properties/Configuration Properties/Linker/General/Additional Library Directories, editing it and checking the "Inherit from parent or object defaults".

Upvotes: 0

stupid
stupid

Reputation: 31

240 means that your version is 2.4.0 so just change the 240s in accord to your version of opencv, mine's 2.4.5 so mine's 245 :)

Upvotes: 3

PeakGen
PeakGen

Reputation: 23035

Found the answer!

Add the following to the Project Properties->Linker->Input->Additional Dependancies

opencv_calib3d240d.lib
opencv_contrib240d.lib
opencv_core240d.lib
opencv_features2d240d.lib
opencv_flann240d.lib
opencv_gpu240d.lib
opencv_haartraining_engined.lib
opencv_highgui240d.lib
opencv_imgproc240d.lib
opencv_legacy240d.lib
opencv_ml240d.lib
opencv_nonfree240d.lib
opencv_objdetect240d.lib
opencv_photo240d.lib
opencv_stitching240d.lib
opencv_ts240d.lib
opencv_video240d.lib
opencv_videostab240d.lib

Go to Linker->General->Enable Incremental Linking and select No(/INCREMENTAL:NO);

Upvotes: 2

Related Questions