Qimage, Entry point error, missing DLL's



  • Hi
    I’m writing a program in visual studio 2017 that uses the QImage library. I created my project with the qt add-in (qt version installed 5.10.0/msvc2017_64) as I was hoping to avoid any missing Qt libraries. My program compiles without error but when I try to run the program I get the following message: ??4QImage@@QEAAAEAV0@$$QEAV0@Z was not found in dll-library.
    I have tried reinstalling qt and the qt add-in as well as creating my project from scratch to be sure everything was installed correctly but I still get the same error message.
    So, why is the qimage.dll missing and how do I include it?
    Below I have also compiled the .pro file so you can see what I include:

    ----------------------------------------------------

    This file is generated by the Qt Visual Studio Tools.

    ------------------------------------------------------

    TEMPLATE = app
    TARGET = QtConsoleApplication3
    DESTDIR = ../windows/x64/Release
    QT += core widgets gui quickwidgets
    CONFIG += release console
    DEFINES += _UNICODE WIN64 QT_DLL QT_QUICKWIDGETS_LIB QT_WIDGETS_LIB
    INCLUDEPATH += ../../hidapi
    .
    ./GeneratedFiles/Release
    DEPENDPATH += .
    MOC_DIR += ./GeneratedFiles/release
    OBJECTS_DIR += release
    UI_DIR += ./GeneratedFiles
    RCC_DIR += ./GeneratedFiles
    include(QtConsoleApplication3.pri)


  • Moderators

    @EsmannP
    the QImage class is contained in QtGui module/dll

    What are the contents of QtConsoleApplication3.pri?

    Also why do you added those defines?! QT_DLL QT_QUICKWIDGETS_LIB QT_WIDGETS_LIB



  • @raven-worx
    The contents of .pri are:

    ----------------------------------------------------

    This file is generated by the Qt Visual Studio Tools.

    ------------------------------------------------------

    This is a reminder that you are using a generated .pro file.

    Remove it when you are finished editing this file.

    message("You are running qmake on a generated .pro file. This may not work!")

    HEADERS += ./API.h
    ./common.h
    ./compress.h
    ./Error.h
    ./pattern.h
    ./patternelement.h
    ./PtnImage.h
    ./splash.h
    ./upload.h
    ./usb.h
    SOURCES += ./main.cpp
    ./API.c
    ./compress.c
    ./Error.c
    ./pattern.c
    ./splash.c
    ./usb.c
    ./upload.cpp

    As to why I added those defines QT_DLL etc, they were automatically added when making the project with the qt-addin


  • Moderators

    @EsmannP
    do you mean you get the error when you try to launch the application manually?
    Means that you probably have forgotten to deploy some Qt dlls.



  • @raven-worx
    I get the error when I try to start the generated .exe

    How do deploy the missing qt dlls? Build qt statically?


  • Moderators

    @EsmannP
    easiest would be to let the windeployqt tool do most of the stuff.



  • @raven-worx

    Using windeployqt fixed my issue, thank you very much! :)


Log in to reply
 

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