Attention! This forum will be made read-only by Dec-20. Please migrate to https://forum.opencv.org. Most of existing active users should've received invitation by e-mail.

# LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib'

II*I would be very thankful to anybody who helps me to resolve this problem. I have installed OpenCV according to installation guide and also when i type code i don't receive any error message from intellisense (that means that it was configured properly?!). But when it comes to building i always receive this error: LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib'.

I use Visual Studio 2012 (32 bit), Windows 8 (64 bit). *

edit retag close merge delete

Sort by » oldest newest most voted

Yeah as I remember I had a similar troubles with that damn paths when installed OpenCv for the first time.

Try to write the correct paths into your property list. Don't forget, that prefix "d" is only for debug mode, so if you defined 'opencv_core242d.lib it would works only in Debug mode In my properties in VS 2012 I set

C/C++->General/Additional Include Directories:$(OPENCV_DIR)\include Linker/Additional include Directories:$(OPENCV_DIR)\x86\vc10\lib

opencv_core243d.lib opencv_imgproc243d.lib opencv_highgui243d.lib opencv_ml243d.lib opencv_video243d.lib opencv_features2d243d.lib opencv_calib3d243d.lib opencv_objdetect243d.lib opencv_contrib243d.lib opencv_legacy243d.lib opencv_flann243d.lib

Here is a step-by-step video(maybe helps):http://www.youtube.com/watch?v=cgo0UitHfp8

more

Hello. I got similar problem. I read book, tutorials etc and it still don't work. Now I have download latest version of OpenCV (2.4.3). Include to my project ( in include directories) "D:\opencv\build\include\opencv2", "D:\opencv\build\include","D:\opencv\build\include\opencv" and in library directories library path "D:\opencv\build\x86\vc10\lib". And in Linker/Input/Additional Dependencies i add opencv_core243d.lib opencv_imgproc243d.lib opencv_highgui243d.lib opencv_ml243d.lib opencv_video243d.lib opencv_features2d243d.lib opencv_calib3d243d.lib opencv_objdetect243d.lib opencv_contrib243d.lib opencv_legacy243d.lib opencv_flann243d.lib

Now i can compile it. But after i run i got error Canot run this application because can't find opencv_core243d.dll. Reinstall should help.

more

Thanks to the guys who tried to help. Even I do have the same error now. It seems that I am going to switch to Eclipse and Ubuntu. Maybe open source fits better with open source. Any suggestion?

( 2012-11-20 09:42:31 -0500 )edit

Yeah "Crash"'s answer is right...But this error also occurs to me when I change my OpenCV version from 2.4.6 to 2.4.9 . I did'nt notice that my .lib files was change from opencv_core246d.lib to opencv_core249d.lib, and so on and so forth. You must also consider this thing.

more

I'm quite new to opencv,same question when from 2.4.3 upgrading to 2.4.9 , but i wanna ask you how can i solve this problem ,hope you can describe it more specifically thank you

( 2014-10-30 22:11:20 -0500 )edit

I think I fixed the problem(first example of code is working). I install opencv on ubuntu ( sudo apt-get install libopencv-dev or something like that in ubuntu terminal ). Then you must create new project in QT Creator (file>new project> qt console application). You will get 2 files main.cpp and your_project_name.proj. Type in 'your_project_name.proj' "INCLUDEPATH += I/usr/include/" "LIBS += -lopencv_core \ -lopencv_highgui \ -lopencv_imgproc \ -lopencv_features2d \ -lopencv_calib3d"

The code in main.cpp file is

#include< opencv2/core/core.hpp>

#include< opencv2/highgui/highgui.hpp>

int main()

{

cv::Mat koko = cv::imread("plik.jpg");
cv::namedWindow("Oko");
cv::imshow("oko",koko);
cv::waitKey(5000);


return 0;

}

And it's work fine. I don't check any other examples.

more

Hi everybody , I've the same problem but this time with world2411 , the msg error is : Error 1 error LNK1104: cannot open file 'opencv_world2411d.lib' , I've checked the configuration (libs....../ release and Debug) and all is good , but I've noticed that a file called "world" exist in the modules file but I can't find it here : C:\opencv\build\x86\vc12\lib , any suggestions plz :)

more

Intellisense will only predict compiler errors, this is a link stage error. You need to add the appropriate library directory to your project configuration. For a 32-bit project use opencv-2.4.x\build\x86\vc10\lib.

more

Official site

GitHub

Wiki

Documentation