0

I'm making a program using OpenCV and I need feature matching. I was previously using OpenCV3 but apparently getting SURF to work is a bit of a hassle so I switched to OpenCV2.4

I downloaded the pre-built libraries and I want to use them on Visual studio but I have a problem, when I run the program I get messages like this:

When I click ok I get more follow up messages complaining about other missing dlls. I tries re-installing but still get this error.

Here are my settings:

Under C/C++>General: Additional Include Directores:

C:\opencv2.4\opencv\build\include

Under Linker>General: Additional Library Directories:

C:\opencv2.4\opencv\build\x64\vc14\lib
C:\opencv2.4\opencv\build\x64\vc14\bin

Under Linker>Incput: Additional Dependencies:

opencv_calib3d2413.lib
opencv_contrib2413.lib
opencv_core2413.lib
opencv_features2d2413.lib
opencv_flann2413.lib
opencv_gpu2413.lib
opencv_highgui2413.lib
opencv_imgproc2413.lib
opencv_legacy2413.lib
opencv_ml2413.lib
opencv_nonfree2413.lib
opencv_objdetect2413.lib
opencv_ocl2413.lib
opencv_photo2413.lib
opencv_stitching2413.lib
opencv_superres2413.lib
opencv_ts2413.lib
opencv_video2413.lib
opencv_videostab2413.lib

I've also tried editing the Environment Variables under Path I've added the include\ bin\ and lib\ directories. I have absolutely no idea how to fix this problem. I know the dlls are there.

1
  • A few things you should notice: 1. Is your program x64 or x86 based?? you are using x64 lib 2. prebuilt libs are for visual studio 2015 (vc 14) Commented Mar 11, 2018 at 22:46

2 Answers 2

4

I copied and pasted the dlls from the bin\ directory into my solution directory and everything works fine now.

I'm not sure why adding the bin\ to the path didn't work but anyway here's the solution to that problem.

Sign up to request clarification or add additional context in comments.

1 Comment

I'm not sure why adding the bin\ to the path didn't work Did you restart Visual Studio after changing your PATH environment variable?
1

The execution program did not find the DLL. Under "Linker>General: Additional Library Directories" it expect the path for .lib files, but the DLL are searched by the program during the executio, so in the current folder and in the PATH folders.

Put the Dll's into the execution folder or modify the PATH to add the DLL's folder (in this last case remember to restart Visual Studio).

Cheers

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.