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. Qt libraries conflict in Windows

Qt libraries conflict in Windows

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 2.4k 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.
  • X Offline
    X Offline
    xtingray
    wrote on last edited by
    #1

    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:
    http://www.maefloresta.com/tmp/bugs/qt_error01.png
    http://www.maefloresta.com/tmp/bugs/qt_error02.png

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


    Qt Developer

    jsulmJ 1 Reply Last reply
    0
    • X xtingray

      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:
      http://www.maefloresta.com/tmp/bugs/qt_error01.png
      http://www.maefloresta.com/tmp/bugs/qt_error02.png

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

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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 http://doc.qt.io/qt-5/qt-conf.html be better?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • X Offline
        X Offline
        xtingray
        wrote on last edited by xtingray
        #3

        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:

        [Paths]
        Prefix=C:\Program Files\MyApp\bin
        Libraries=lib;lib\qt5;lib\support
        

        Now, this is the directory tree of my app:

        app\
        app\bin\app.exe
        app\lib\
        app\lib\qt5
        app\lib\support
        

        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!


        Qt Developer

        jsulmJ 1 Reply Last reply
        0
        • X xtingray

          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:

          [Paths]
          Prefix=C:\Program Files\MyApp\bin
          Libraries=lib;lib\qt5;lib\support
          

          Now, this is the directory tree of my app:

          app\
          app\bin\app.exe
          app\lib\
          app\lib\qt5
          app\lib\support
          

          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!

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @xtingray I would say it should be

          [Paths]
          Prefix=C:/Program Files/MyApp
          Libraries=lib;lib/qt5;lib/support
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • X Offline
            X Offline
            xtingray
            wrote on last edited by xtingray
            #5

            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 :/


            Qt Developer

            1 Reply Last reply
            0
            • X Offline
              X Offline
              xtingray
              wrote on last edited by xtingray
              #6

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

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

              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.

              Thanks!


              Qt Developer

              1 Reply Last reply
              1

              • Login

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