OpenCV Error: LNK1181: cannot open input file 'opencv_core2410.dll.lib'



  • I am new to the Qt ide, and am still learning C++. So I apologize in advance if I do not quite understand something.

    I am trying to setup OpenCV to use inside the Qt IDE for my senior project.
    I have gone through the grueling process of attempting to follow the steps by many tutorials (Steps were easy, errors were the hard part).
    I somehow managed to get through all of these errors, and now I am at my final error (hopefully) and hoping somebody here can help :), here it goes.

    I compiled OpenCV using minGW to c:\opencv\build\install. (OpenCV version 2.4.10)
    This seems OK.
    I set the proper environment variables for this as well, and set what seems to be the proper includes in my .pro file.

    Once I try to run the application, I get the following error.
    :-1: error: LNK1181: cannot open input file 'opencv_core2410.dll.lib'

    Inside the lib folder, everything is named .dll.a, I am not sure if these are supposed to be .dll.lib, or if the .dll.lib files are somewhere else and or missing them.

    untitled4.pro

    #
    # Project created by QtCreator 2015-03-30T22:25:22
    #
    #-------------------------------------------------
    
    QT       += core
    
    QT       -= gui
    
    TARGET = untitled4
    CONFIG   += console
    CONFIG   -= app_bundle
    
    TEMPLATE = app
    
    
    SOURCES += main.cpp
    INCLUDEPATH += C:\\opencv\\build\\install\\include
    LIBS += -LC:\\opencv\\build\\install\\x64\\mingw\\lib \
        -lopencv_core2410.dll \
        -lopecv_highgui2410.dll \
        -lopencv_imgproc2410.dll \
        -lopencv_features2d2410.dll \
        -lopencv_calib3d2410.dll
    

    main.cpp

    #include <opencv2/highgui/highgui.hpp>
    
    int main(){
        cv::Mat image = cv::imread("img.jpg");
    
        cv::namedWindow("My Image");
    
        cv::imshow("My Image", image);
    
        cv::waitKey(5000);
        return 1;
    }
    

    Thank you in advance for the help, it is much appreciated :)!



  • LIBS += -LC:\opencv\build\install\x64\mingw\lib
    -lopencv_core2410
    -lopecv_highgui2410
    -lopencv_imgproc2410
    -lopencv_features2d2410
    -lopencv_calib3d2410

    If your *.lib in "C:\opencv\build\install\x64\mingw\lib" and add the "C:\opencv\build\install\x64\mingw\bin" ( should containing your DLLs ) in your Project-Enviroment Path



  • I still come out to the same error.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.