Important: Please read the Qt Code of Conduct -

Qt libraries conflict in Windows

  • Hi,

    I have detected a problem with my Qt application in Windows:

    My installer defines several variables in the system and adds some library paths into the PATH variable. On the other hand, the launcher just call the app executable (app.exe) directly. If there are no other Qt applications installed in the system, my app works perfectly, but if there are others, then when I try to run the app I got this message: "The procedure entry point could not be located in the dynamic link library".

    Here some examples of the error message:

    I am guessing that there is a conflict between the Qt library versions. How can I avoid this problem? Any suggestion?

  • Lifetime Qt Champion

    @xtingray said in Qt libraries conflict in Windows:

    adds some library paths into the PATH variable

    Why? This can easily break other software.
    Wouldn't be better?

  • Hi,

    After reading the documentation it isn't clear for me if the qt.conf file must be loaded from my application code or if it just have to be located in the same directory of my app.exe file to work.

    I made some unsuccessful tests creating several versions of my qt.conf file, moving it from folder to folder with no luck. This is one of those versions:

    Prefix=C:\Program Files\MyApp\bin

    Now, this is the directory tree of my app:


    What should be the content of my qt.conf file to make it work and where should I locate it? Do I have to do something inside my main.cpp too?
    Thank you for your help!

  • Lifetime Qt Champion

    @xtingray I would say it should be

    Prefix=C:/Program Files/MyApp

  • Sorry, I already tried it but it didn't work :(

    I found a non so elegant solution for my problem: to copy all the library dll files in the same directory of my app.exe file. Even more, without editing the PATH variable I can launch my application successfully, but as I need to run some specific tests while I am deploying the application, it would be great if I can locate all the .dll files in a different directory than the app executable.

    If to use the qt.conf file only requires to put it in the same directory of the .exe file, the instruction is very basic indeed, but it isn't working for me :/

  • Finally I could solve my problem using a .bat launcher for my app:

    set path=..\lib;..\lib\qt5;..\lib\support

    Now, it doesn't matter where path I choose to install my app, I can launch it without modifying the PATH variable of the system.


Log in to reply