Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Reading an image exits with error code -1073741515 (“Some dll not found”)
Forum Update on Monday, May 27th 2025

Reading an image exits with error code -1073741515 (“Some dll not found”)

Scheduled Pinned Locked Moved General and Desktop
opencvqt4c++dll
4 Posts 3 Posters 2.5k Views
  • 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.
  • F Offline
    F Offline
    farazk86
    wrote on last edited by
    #1

    I have a very simple program to test my opencv installation:

    #include <opencv2/core/core.hpp>
    #include <opencv2/highgui/highgui.hpp>
    #include "opencv/cv.h"
    int main() {
            // read an image
            cv::Mat image= cv::imread("c:\\img.jpg");
            // create image window named "My Image"
            cv::namedWindow("My Image");
            // show the image on window
            cv::imshow("My Image", image);
            // wait key for 5000 ms
            cv::waitKey(0);
            return 1;
    }
    

    I am using Qt Creator for this and when I run the code it exits with the error: -1073741515, which according to this post:http://www.qtcentre.org/threads/57083-1073741515-problem relates to a dll not found.

    This is really annoying as I am sure I have pretty much done everything according to the book. Here is my pro file:

    #-------------------------------------------------
    #
    # Project created by QtCreator 2015-03-30T06:33:21
    #
    #-------------------------------------------------
    
    QT       += core
    
    QT       -= gui
    
    TARGET = opencv_pls
    CONFIG   += console
    CONFIG   -= app_bundle
    
    TEMPLATE = app
    
    
    SOURCES += main.cpp
    INCLUDEPATH += D:\\opencv_bin\\install\\include
    LIBS += -LD:\\opencv_bin\\lib \
        -lopencv_core2410.dll \
        -lopencv_highgui2410.dll \
        -lopencv_imgproc2410.dll \
        -lopencv_features2d2410.dll \
        -lopencv_calib3d2410.dll
    

    And here is my PATH:

    C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\CMake\bin;D:\Qt\4.7.0\bin;D:\mingw\bin;D:\OpenCV-2.2.0_bin\bin;D:\OpenCV-2.2.0_bin\include;D:\Program Files\MATLAB\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;d:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\runtime\win64;d:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v81\runtime\win32; 
    

    Everything seems to be in order.

    Dependency Walker shows these errors:

    enter image description here

    But according to this post: http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems these are all false positives.

    WHAT am I missing??? I'm nearly at the stage of pulling my hair out.
    Help please

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      At least libstdc++-6.dll is required. Respectively all MinGW related dlls are required.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        Also there are the plugins which have to be present. I think I had a similar message when the image format dlls were missing.
        Did you checkout the windows deployment docs?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          To add to @koahnig , your application is probably not finding the OpenCV dlls. You would need to update the PATH variable in the Run part of the Project panel.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved