Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    3rd Party Software
    opencv
    2
    3
    3723
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Todd Morehouse
      Todd Morehouse last edited by Todd Morehouse

      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 :)!

      College Electronics Engineering Student
      current project 3D Printer Embedded Computer

      High School Robotics Project - InMoov Humanoid Robot Head

      FTC Robotics Member 2013-2015
      SkillsUSA Mobile Robotics Competitor 2014

      1 Reply Last reply Reply Quote 0
      • H
        hpollak last edited by

        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

        1 Reply Last reply Reply Quote 0
        • Todd Morehouse
          Todd Morehouse last edited by

          I still come out to the same error.

          College Electronics Engineering Student
          current project 3D Printer Embedded Computer

          High School Robotics Project - InMoov Humanoid Robot Head

          FTC Robotics Member 2013-2015
          SkillsUSA Mobile Robotics Competitor 2014

          1 Reply Last reply Reply Quote 0
          • First post
            Last post