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. Which DLL files to need to run exe files in other computer?
Forum Updated to NodeBB v4.3 + New Features

Which DLL files to need to run exe files in other computer?

Scheduled Pinned Locked Moved General and Desktop
42 Posts 8 Posters 37.9k Views 1 Watching
  • 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.
  • L Offline
    L Offline
    LeeMinh
    wrote on last edited by
    #17

    When I copy a basic project to target PC. It work fine.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      LeeMinh
      wrote on last edited by
      #18

      [quote author="JKSH" date="1374565818"]
      Sorry, I wasn't clear before: Does it run properly on your development PC, outside Qt Creator? Close Qt Creator, and run your program by launching the .exe file directly.
      [/quote]
      Yes,I close the Qt Creator and It run fine at development machine.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LeeMinh
        wrote on last edited by
        #19

        It's seem missing some dll when I ran real project at target machine.I use sqlite for database and some images for icon. That's all.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LeeMinh
          wrote on last edited by
          #20

          It show
          C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\imageformats\qgif.dl at Process Explorer.
          Will we create release\imageformats folder?

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

            Hi,

            The deployment documentation "plugins chapter":https://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#qt-plugins

            explains that.
            Basically you need to create the plugins folder and the needed subfolder like imageformats.

            appfolder
            appfolder\plugins
            appfolder\plugins\imageformats
            etc...

            I've written a doc note with some examples about it but it has been on moderation for some time now and I can't access it.

            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
            • L Offline
              L Offline
              LeeMinh
              wrote on last edited by
              #22

              yes, thanks for your solution . But it didnt' work , Will we NEED reconfigure something at .pro file?

              After I add these folder.

              *appfolder\plugins*
              appfolder\plugins\accessible
              appfolder\plugins\imageformats
              appfolder\plugins\platforms
              appfolder\plugins\sqldrivers

              It didn't work. So that, I try with :

              *appfolder\release\plugins*
              appfolder\plugins\plugins\accessible
              appfolder\plugins\plugins\mageformats
              appfolder\plugins\plugins\platforms
              appfolder\plugins\plugins\sqldrivers

              It didn't work too.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dbzhang800
                wrote on last edited by
                #23

                remove the plugins from your paths please

                [quote author="LeeMinh" date="1374571023"]yes, thanks for your solution . But it didnt' work , Will we NEED reconfigure something at .pro file?

                After I add these folder.

                *appfolder\plugins*
                appfolder\plugins\accessible
                appfolder\plugins\imageformats
                appfolder\plugins\platforms
                appfolder\plugins\sqldrivers

                It didn't work. So that, I try with :

                *appfolder\release\plugins*
                appfolder\plugins\plugins\accessible
                appfolder\plugins\plugins\mageformats
                appfolder\plugins\plugins\platforms
                appfolder\plugins\plugins\sqldrivers

                It didn't work too.[/quote]

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

                  The only exception is platform, it should be in appfolder directly so:

                  appfolder\plaftorms
                  appfolder\plugins\imageformats
                  etc..

                  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
                  • L Offline
                    L Offline
                    LeeMinh
                    wrote on last edited by
                    #25

                    @SGaist : Do you mean that we* will not* put platforms and plugins to RELEASE folder. Will We put these folder to appfolder?

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dbzhang800
                      wrote on last edited by
                      #26

                      [quote author="SGaist" date="1374571281"]The only exception is platform, it should be in appfolder directly so:

                      appfolder\plaftorms
                      appfolder\plugins\imageformats
                      etc..[/quote]

                      Both
                      @
                      appfolder\plugins\imageformats
                      @
                      and
                      @
                      appfolder\imageformats
                      @

                      can be used.

                      But if we use the former, a configure file called qt.conf is needed. while the latter doesn't need this file.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dbzhang800
                        wrote on last edited by
                        #27

                        [quote author="SGaist" date="1374571281"]The only exception is platform, it should be in appfolder directly so:

                        appfolder\plaftorms
                        appfolder\plugins\imageformats
                        etc..[/quote]

                        Both
                        @
                        appfolder\plugins\imageformats
                        @
                        and
                        @
                        appfolder\imageformats
                        @

                        can be used.

                        But if we use the former, a configure file called qt.conf is needed, or the plugins path should manually set in the source code. while the latter doesn't need this.

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          LeeMinh
                          wrote on last edited by
                          #28

                          It's still didn't work. May you access my machine by teamviewer?.

                          I replace all of them by :

                          @appfolder
                          appfolder\accessible
                          appfolder\imageformats
                          appfolder\sqldrivers@

                          @appfolder\release\plugins
                          appfolder\release\plugins\accessible
                          appfolder\release\plugins\mageformats
                          appfolder\release\plugins\platforms
                          appfolder\release\plugins\sqldrivers@

                          But it didnt' work.

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            LeeMinh
                            wrote on last edited by
                            #29

                            I put

                            @appfolder\plugins
                            appfolder\plugins\accessible
                            appfolder\plugins\mageformats
                            appfolder\plugins\platforms
                            appfolder\plugins\sqldrivers@

                            And write code:

                            @int main(int argc, char *argv[])
                            {
                            qApp->addLibraryPath("../plugins");
                            QApplication a(argc, argv);

                            MainWindow w;
                            w.show();
                            
                            return a.exec();
                            

                            }@ at main.cpp

                            But it didnt' work. Just show "Microsoft Visual C++ runtime library".

                            1 Reply Last reply
                            0
                            • L Offline
                              L Offline
                              LeeMinh
                              wrote on last edited by
                              #30

                              I make some basic project for testing. It work fine if we use images , but if when I use sqlite for connect. It shows error “Microsoft Visual C++ runtime library”. I think that because we didn't reconfig plugins. So that, It shows error.

                              1 Reply Last reply
                              0
                              • JKSHJ Offline
                                JKSHJ Offline
                                JKSH
                                Moderators
                                wrote on last edited by
                                #31
                                • Where did you put qsqlite.dll?
                                • What compiler did you use?
                                • How many copies of Qt do you have on your development PC?
                                • Which package(s) of Qt did you install?
                                  ** Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)?
                                  ** Qt 5.1.0 for Windows 64-bit (VS 2012, 525 MB)?
                                  ** Something else?

                                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  jech
                                  wrote on last edited by
                                  #32

                                  Hi, I'm trying to solve the same problem. I do believe that the issue I have has something to do with QML. But I'm not sure. I copied all the DLLs the program requested, but if I run it, I only get a blank window.

                                  I even tried to use q .qrc file, to include the .qml files in the .exe file. But with the same result.

                                  What bothers me most is that I don't know how to find out what is wrong. Even if I run the program from console, it doesn't show any message in it.

                                  1 Reply Last reply
                                  0
                                  • JKSHJ Offline
                                    JKSHJ Offline
                                    JKSH
                                    Moderators
                                    wrote on last edited by
                                    #33

                                    Hi Jech,

                                    Did you deploy the built-in QML-related files? You need the *.qml, qmldir and *.dll files in C:<Qt>\qml.

                                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                    1 Reply Last reply
                                    0
                                    • J Offline
                                      J Offline
                                      jech
                                      wrote on last edited by
                                      #34

                                      Yes, I did. I even tried to specify the path to these files either as absolute or relative but it didn't help. It used to work without any problems with Qt4, so I'm wondering why it is a problem with Qt5 now.

                                      Is there any possibility to debug the problem to at least find out if the problem is related to QML files or something else?

                                      Thank you!

                                      1 Reply Last reply
                                      0
                                      • J Offline
                                        J Offline
                                        jech
                                        wrote on last edited by
                                        #35

                                        Hi JKSH,
                                        just to be sure, you mean the 3 files in directory c:\Qt\5.2.0\mingw48_32\qml\QtQml\Models.2 ? I suppose they should be in the same directory as my .exe file. Or somewhere else?

                                        1 Reply Last reply
                                        0
                                        • JKSHJ Offline
                                          JKSHJ Offline
                                          JKSH
                                          Moderators
                                          wrote on last edited by
                                          #36

                                          Hi Jech,

                                          I mean _C:\Qt\5.2.0\mingw48_32\qml_ itself.

                                          These are your plugins folders:

                                          • C:\Qt\5.2.0\mingw48_32\plugins\ -- C++ plugins
                                          • C:\Qt\5.2.0\mingw48_32\qml\ -- QML plugins

                                          You need to copy some of the subfolders in these plugin folders. The exact combination that you need depends on the features that you use. Example:

                                          • <MyApp>\app.exe
                                          • <MyApp>\ qml\MyApp\main.qml ^
                                          • <MyApp>\ qml\MyApp\MyCustomQmlFile.qml ^
                                          • <MyApp>\Qt5Core.dll
                                          • ...
                                          • <MyApp>\QtQuick.2\qmldir
                                          • <MyApp>\QtQuick.2\qtquick2plugin.dll
                                          • <MyApp>\platforms\qwindows.dll

                                          The first 3 (italicized) lines are your project-specific files, which you should copy from your build directory. The rest should be copied from _C:\Qt\5.2.0\mingw48_32_ somewhere.

                                          The 2nd and 3rd (^) lines depend on your code. My example above assumes that you used Qt Creator's defaults for a new Qt Quick 2 project, so your main.cpp should have this line:
                                          @
                                          // Your deployment folder structure is shown below:
                                          viewer.setMainQmlFile(QStringLiteral("qml/MyApp/main.qml"));
                                          @

                                          An easy way is to copy all the subfolders of _c:\Qt\5.2.0\mingw48_32\qml_ into your .exe directory, and then launch your program. If it works, delete things one by one and try launching again, to see what you need and what you don't.

                                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                          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