Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] NEW and CONFUSED

[SOLVED] NEW and CONFUSED

Scheduled Pinned Locked Moved Installation and Deployment
33 Posts 5 Posters 18.1k 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.
  • P Offline
    P Offline
    Peppy
    wrote on 3 Jul 2013, 22:00 last edited by
    #2

    Try to reinstall MinGW (according to: http://stackoverflow.com/questions/13442233/how-to-solve-mingw32-make-exe-exited-with-code-2-error )

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nHx4U
      wrote on 4 Jul 2013, 18:54 last edited by
      #3

      Thanks for your quick response.
      I will re-install and try the tutorials again tonight, and inform you of my
      results.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nHx4U
        wrote on 5 Jul 2013, 15:25 last edited by
        #4

        I re-installed Qt 5.1 with MingW48. I completed the beginners tutorial.
        All worked fine. >>> However >>>>
        Where's the "EXE"? I've built and run the tutorial but it doesn't create an independent application. Is there another step? or is the exe hidden in a folder somewhere? I've also copied the exe from the included example demo's, and they don't run outside the original example folder.

        I appreciate your help.

        Thanks.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JKSH
          Moderators
          wrote on 5 Jul 2013, 23:47 last edited by
          #5

          [quote author="nHx4U" date="1373037925"]
          Where's the "EXE"? I've built and run the tutorial but it doesn't create an independent application. Is there another step? or is the exe hidden in a folder somewhere?[/quote]With your project open, click the "Projects" button on the left of Qt Creator. That will show you the "build directory" where the .exe is produced.

          This technique is called "shadow building" -- the .exe is built in a folder separate to your source code, to keep your code directory clean.

          [quote]I've also copied the exe from the included example demo's, and they don't run outside the original example folder.[/quote]You need more than the .exe. You also need the DLLs that the .exe depends on. See "Creating the Application Package" at http://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html#creating-the-application-package (but the only plugin you need is platforms\qwindows.dll -- ignore the instructions for other plugins)

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

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nHx4U
            wrote on 9 Jul 2013, 21:24 last edited by
            #6

            Sorry. Still can't create a "Stand-Alone" package. I followed your instructions and created a "release" version (exe) in a separate folder. I've added a subfolder "platforms\windows.dll". I used "Dependency Walker" and copied the suggested .dll's into the folder, and it still won't run!. (Lots of DLL's. Some show up in 2 different locations and file sizes: one in MingW and also in Qt. I selected the mingw files. These were typically larger than the similar named Qt dlls.)

            I created a simple app from:

            http://qt-project.org/wiki/Basic_Qt_Programming_Tutorial

            and also tried to follow the instructions in:

            http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#application-dependencies

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JKSH
              Moderators
              wrote on 10 Jul 2013, 00:25 last edited by
              #7

              Please list all the contents of the folder where you tried to put your standalone package (.exe, .dlls, and subdirectories) -- it's hard to tell what you've put in there from broad descriptions alone.

              [quote author="nHx4U" date="1373405075"]Some show up in 2 different locations and file sizes: one in MingW and also in Qt.[/quote]Please also list the absolute paths of these 2 folders that contain the DLLs

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

              1 Reply Last reply
              0
              • N Offline
                N Offline
                nHx4U
                wrote on 10 Jul 2013, 13:43 last edited by
                #8

                Here's the PATH and Contents:

                C:\USERS\STEVE\DESKTOP\Qt_TUTORIALS\Qt_TUTORIAL-01\

                • Qt-Ttutorial-01.exe

                • moc_widget.cpp

                • api-ms-win-core-console-l1-1-0.dll

                • D3DCompiler_43.dll

                • icudt51.dll

                • icuin51.dll

                • icuuc51.dll

                • IEShims.dll

                • libEGL.dll

                • libgcc_s_dw2-1.dll

                • libgcc_s_sjlj-1.dll

                • libGLESv2.dll

                • libstdc++-6.dll

                • libwinpthread-1.dll

                • mingwm10.dll

                • Qt5Core.dll

                • Qt5Gui.dll

                • Qt5Multimedia.dll

                • Qt5MultimediaWidgets.dll

                • Qt5Network.dll

                • Qt5OpenGL.dll

                • Qt5Widgets.dll

                • QtCore4.dll

                • QtGui4.dll

                • main.o

                • moc_widget.o

                • widget.o

                • \PLATFORMS\
                  Qwindows.dll

                Thank you.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nHx4U
                  wrote on 12 Jul 2013, 21:57 last edited by
                  #9

                  Sorry. My last reply was not clear. Resent.

                  C:\USERS\STEVE\DESKTOP\Qt_TUTORIALS\Qt_TUTORIAL-01\

                  1. Qt-Ttutorial-01.exe
                  2. moc_widget.cpp
                  3. api-ms-win-core-console-l1-1-0.dll
                  4. D3DCompiler_43.dll – icudt51.dll
                  5. icuin51.dll
                  6. icuuc51.dll
                  7. IEShims.dll
                  8. libEGL.dll
                  9. libgcc_s_dw2-1.dll
                  10. libgcc_s_sjlj-1.dll
                  11. libGLESv2.dll
                  12. libstdc++-6.dll
                  13. libwinpthread-1.dll
                  14. mingwm10.dll
                  15. Qt5Core.dll – Qt5Gui.dll
                  16. Qt5Multimedia.dll
                  17. Qt5MultimediaWidgets.dll
                  18. Qt5Network.dll
                  19. Qt5OpenGL.dll
                  20. Qt5Widgets.dll
                  21. QtCore4.dll
                  22. QtGui4.dll
                  23. main.o
                  24. moc_widget.o
                  25. widget.o
                  26. \PLUGINS\
                  27.                          Qwindows.dll
                    
                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 13 Jul 2013, 04:04 last edited by
                    #10

                    Sorry, I missed your last post.

                    "PLUGINS\Qwindows.dll" should be "platforms\qwindows.dll"

                    You have both Qt 4 (QtCore4.dll, QtGui4.dll) as well as Qt 5 (Qt5Core.dll, Qt5Gui.dll) DLLs -- those don't go together. Uninstall Qt 4 from your system completely and remove the Qt 4 DLLs. Then, delete these and re-compile your project

                    • Qt-Ttutorial-01.exe
                    • moc_widget.cpp
                    • *.o

                    Get rid of api-ms-win-core-console-l1-1-0.dll and IEShims.dll -- those are system DLLS which you shouldn't need to deploy (Dependency Walker gave you false warnings here)

                    [quote]Some show up in 2 different locations and file sizes: one in MingW and also in Qt. I selected the mingw files. [/quote] Use the ones in the "Qt" folder. Also, please list the DLLs that you found in two places.

                    Some questions:

                    • Did you uninstall Qt 5.0.2 before trying to compile with Qt 5.1? If not, uninstall Qt 5.0.2
                    • Do you have multiple installations of MinGW in your computer? If you do, uninstall all others except for the one that came with Qt.

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

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      nHx4U
                      wrote on 18 Jul 2013, 01:23 last edited by
                      #11

                      Thanks for your reply.
                      I've performed your last suggestions, and now get these errors:

                      When clicking Qt-Ttutorial-01.exe from RELEASE folder:

                      1. The procedure entry point
                        _Z8qWinMainP11HINSTANCE_S0_PciRiR7QVectorIS1_E could not
                        be located in the dynamic link library Qt5Core.dll.

                      When running release build from Qt Creator (Qt-Tutorial-01.pro):

                      1. Starting C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release\release\Qt-Ttutorial-01.exe...
                        The program has unexpectedly finished.
                        C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release\release\Qt-Ttutorial-01.exe exited with code -1073741511

                      3. Running from the DEBUG build (in Qt Creator) works properly.

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        eMixam
                        wrote on 18 Jul 2013, 06:14 last edited by
                        #12

                        For your 1st and 2nd error I would say it's a .dll problem, do you still have Qt4 or Qt5.0.2 dll in your release folder ?
                        Maybe you're compiling with Qt5.1 but the ones that are used are Qt5.0.2.

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          nHx4U
                          wrote on 18 Jul 2013, 14:58 last edited by
                          #13

                          Thought I deleted everything other than Qt 5.1

                          I will use a "deep" uninstaller and clear everything Qt and re-install Qt 5.1

                          I will get back to you on results in a few days.

                          Thanks for your help.

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            JKSH
                            Moderators
                            wrote on 18 Jul 2013, 15:07 last edited by
                            #14

                            [quote author="nHx4U" date="1374110617"]

                            1. The procedure entry point
                              _Z8qWinMainP11HINSTANCE_S0_PciRiR7QVectorIS1_E could not
                              be located in the dynamic link library Qt5Core.dll.[/quote]That means the program is using the wrong version of the DLL.

                            Question: Are you absolutely sure that you only have 1 version of Qt in your computer, and you have uninstalled all other versions?

                            Do this first:

                            Delete the folder C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release

                            Build your project again in Qt Creator

                            Copy the DLLs that you need from C:\Qt\Qt5.1.0\mingw48_32\bin -- (if this is NOT where your DLLs are found, tell us the full directory)

                            Secondly, open a Windows Command Prompt (click Start -> Run, type in "cmd", and press Enter). Run this command...
                            @
                            path > C:\Users\Steve\Desktop\path.txt
                            @
                            ...then open the text file on your desktop and paste the result here.

                            [quote author="nHx4U" date="1374110617"]I’ve performed your last suggestions[/quote]Please be more descriptive in the future, and give step-by-step details of what you did. If you just say "I’ve performed your last suggestions", I can't tell if you performed it correctly or not.

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

                            1 Reply Last reply
                            0
                            • N Offline
                              N Offline
                              nHx4U
                              wrote on 19 Jul 2013, 15:17 last edited by
                              #15

                              TO: JKSH (and others who have responded). Thank you very much.
                              I have performed tasks 1,2,3 above AND it actually works! :-)

                              Below is list of files and locations. Actual DLLs used were copied from Qt..\mingw subfolder.

                              FOLDER
                              C:\USERS\STEVE\DESKTOP\Qt_TUTORIALS\Qt_TUTORIAL-01\ File Source File Size - KB Alternate Location Alternate Size - KB

                              1 D3DCompiler_43.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 2057 C:\windows\SysWOW64\ 2057
                              2 icudt51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 21794 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 21854
                              3 icuin51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 1726 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 3291
                              4 icuuc51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 1266 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 1933
                              5 libEGL.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 47 n/a
                              6 libgcc_s_dw2-1.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 533 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 533
                              7 libgcc_s_sjlj-1.dll C:\Program Files\PostgreSQL\9.2\bin 76 C:\Program Files\PostgreSQL\9.2\bin\postgisgui 40
                              8 libGLESv2.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 712 n/a
                              9 libstdc++-6.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 967 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 967
                              10 libwinpthread-1.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 73 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 73
                              11 mingwm10.dll C:\Program Files(x86)\PostgreSQL\UpdateMonitor\bin 16 n/a
                              12 Qt5Core.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 3764 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4287
                              13 Qt5Gui.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 2856 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4346
                              14 Qt5Multimedia.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 528 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 797
                              15 Qt5MultimediaWidgets.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 74 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 124
                              16 Qt5Network.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 806 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 1361
                              17 Qt5OpenGL.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 238 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 392
                              18 Qt5Widgets.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 4170 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 6003
                              19 Qt-Ttutorial-01.exe Created by Qt Creator 44 n/a
                              \PLATFORMS\ n/a
                              1 Qwindows.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\plugins\platforms 814 n/a

                              (Above would be clearer if one could include attachments or at least have a horizontal scroll in this window)

                              HERE IS THE PATH FILE:

                              PATH=C:\Python27;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn;c:\sdc\orant\bin;c:\sdc\oraclexe\app\oracle\product\10.2.0\server\bin;c:\sdc\unix;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn;C:\Program Files (x86)\AgentOffice;C:\Program Files (x86)\Calibre2;H:\QuickTime\QTSystem\

                              How does one know which files to include in the release folder - Other than "Dependency Walker"? When a particular DLL shows up in both Qt and mingw do you always choose the mingw? The mingw files are typically larger than the ones in the Qt folder.

                              I will now go on to attempt something more complex.

                              Thanks for all your help. Really appreciate it.

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                JKSH
                                Moderators
                                wrote on 20 Jul 2013, 00:10 last edited by
                                #16

                                Glad to hear! :) I hope you have fun exploring what Qt has to offer. If you have any more questions, please feel free to ask in these forums, and I'm sure someone will try to help you.

                                From this exercise, the take-home messages are:

                                • Be aware of the libraries that you're using.
                                  ** If there are multiple versions on your computer, always ensure that you are linking to the correct version, and that you copy the correct DLLs
                                • When you upgrade or change something (such as your libraries, or even your source code), you may need to delete your previously-compiled files because they could be linked to old libraries
                                  ** Some problems can be solved by deleting those files and re-compiling from scratch, like what you just did

                                [quote]
                                File Source File Size – KB Alternate Location Alternate Size – KB

                                Qt5Core.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 3764 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4287[/quote]Actually...

                                This folder contains your Qt library (YOU SHOULD COPY THESE DLLS FOR YOUR STANDALONE APPLICATION):

                                • C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\

                                This folder contains the Qt Creator IDE (code editor), not your Qt library

                                • C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\

                                This folder contains your MinGW compiler

                                • C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin

                                Qt Creator is a standalone application. Its DLLs could be older than your library, so you don't want to copy those!

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

                                1 Reply Last reply
                                0
                                • V Offline
                                  V Offline
                                  vtong
                                  wrote on 29 Jul 2013, 10:29 last edited by
                                  #17

                                  I also have the same problem.
                                  My Application is based on Qt5.1
                                  My system used:

                                  • Qt5.1
                                  • Mingw32
                                    I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
                                    Please help to deploy application compiled in mingw to other window PC.
                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    JKSH
                                    Moderators
                                    wrote on 29 Jul 2013, 11:33 last edited by
                                    #18

                                    [quote author="vtong" date="1375093795"]I also have the same problem.
                                    My Application is based on Qt5.1
                                    My system used:

                                    • Qt5.1
                                    • Mingw32
                                      I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
                                      Please help to deploy application compiled in mingw to other window PC.[/quote]Which Qt package did you download? (Please provide the full link)

                                    Where did you install MinGW?

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

                                    1 Reply Last reply
                                    0
                                    • V Offline
                                      V Offline
                                      vtong
                                      wrote on 29 Jul 2013, 13:42 last edited by
                                      #19

                                      [quote author="JKSH" date="1375097634"][quote author="vtong" date="1375093795"]I also have the same problem.
                                      My Application is based on Qt5.1
                                      My system used:

                                      • Qt5.1
                                      • Mingw32
                                        I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
                                        Please help to deploy application compiled in mingw to other window PC.[/quote]Which Qt package did you download? (Please provide the full link)

                                      Where did you install MinGW?[/quote]

                                      Thanks for your response.
                                      I downloaded the Qt5.1 from: http://download.qt-project.org/official_releases/qt/5.1/5.1.0/qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe
                                      After I installed, I have a folder: C:\Qt\Qt5.1.0
                                      I used all library from: C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin
                                      I searched and found a lot solution but no ones work for me.
                                      Note: I use Qwt-6.1.0 in my application, I build and install it by Command Prompt from Qt the I installed

                                      1 Reply Last reply
                                      0
                                      • J Offline
                                        J Offline
                                        JKSH
                                        Moderators
                                        wrote on 29 Jul 2013, 14:05 last edited by
                                        #20

                                        The MinGW in that package uses Dwarf-2 instead of SJLJ, so replace libgcc_s_sjlj-1.dll with libgcc_s_dw2-1.dll.

                                        Also, MinGW has changed: you don't need mingwm10.dll anymore, but you now need libwinpthread-1.dll

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

                                        1 Reply Last reply
                                        0
                                        • V Offline
                                          V Offline
                                          vtong
                                          wrote on 29 Jul 2013, 14:51 last edited by
                                          #21

                                          @JKSH: Thanks for your advice.
                                          I did copy all the files you mention to application folder, I all so put platform folder as well.
                                          But somehow the application still show Visual C++ Runtime error when I run it in other PC.
                                          Very confused now.
                                          Please advice.
                                          Thanks

                                          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