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
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] NEW and CONFUSED

Scheduled Pinned Locked Moved Installation and Deployment
33 Posts 5 Posters 18.8k 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.
  • JKSHJ Offline
    JKSHJ Offline
    JKSH
    Moderators
    wrote on 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 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
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on 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 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
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on 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 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
              • JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #22

                If it's showing a Visual C++ error, that means your binary was compiled with Visual Studio, not MinGW... Check that:

                You are using the correct Qt package

                You are using the correct compiler

                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 last edited by
                  #23

                  I used MingW, to make sure nothing wrong, I removed the msvc-2010 from the Qt installed directory, but the error still happened.
                  It pop up a window with message: "This application has requested the Rumtime to terminate it in an unsual qat. Please contact...."

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

                    "This application has requested the Runtime to terminate it in an unusual way" is definitely a Visual Studio message. You need to clean your environment.

                    Uninstall all versions of Qt except for the MinGW one. Remove Visual Studio from your PATH. Delete your *.o and *.exe files and recompile.

                    If you still can't solve the problem, uninstall Visual Studio and try again.

                    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 last edited by
                      #25

                      Hi JKSH,
                      I did all things you mention, but when I run my app on another PC, it pop up another message: "The application failed to start because it could not find or load platform plugin "windows". Reinstalling the application may fix this problem"
                      When I click OK, it come with Visual C++ Runtime library error.
                      Don't know why this happen, even I copy the platforms/qwindows.dll from mingw_32/bin.
                      Any idea to fix this?

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

                        Can you run the application from your development PC, in Qt Creator?

                        Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?

                        Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.

                        qwindows.dll must be in a subfolder:
                        myapp\myapp.exe
                        myapp\Qt5Core.dll
                        myapp\platforms\qwindows.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 last edited by
                          #27

                          [quote author="JKSH" date="1375235308"]# Can you run the application from your development PC, in Qt Creator?

                          Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?

                          Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.

                          qwindows.dll must be in a subfolder:
                          myapp\myapp.exe
                          myapp\Qt5Core.dll
                          myapp\platforms\qwindows.dll[/quote]

                          I put app and dlls as the same as your suggestion.
                          To answer your questions:
                          1/ I can run the app from Qt Creator (Press Run button).
                          2/ I can't run the app outside Qt Creator, double-click exe from Release folder or from other folder, I must copy all requred dlls to the app folder to make it run.
                          3/ The other PC is fresh, no Qt Installed.

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            vtong
                            wrote on last edited by
                            #28

                            [quote author="vtong" date="1375244963"]
                            [quote author="JKSH" date="1375235308"]# Can you run the application from your development PC, in Qt Creator?

                            Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?

                            Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.

                            qwindows.dll must be in a subfolder:
                            myapp\myapp.exe
                            myapp\Qt5Core.dll
                            myapp\platforms\qwindows.dll[/quote]

                            I put app and dlls as the same as your suggestion.
                            To answer your questions:
                            1/ I can run the app from Qt Creator (Press Run button).
                            2/ I can't run the app outside Qt Creator, double-click exe from Release folder or from other folder, I must copy all requred dlls to the app folder to make it run.
                            3/ The other PC is fresh, no Qt Installed.[/quote]

                            (UPDATE):
                            I just do REcompile with a fresh project from my github:
                            I clean all file from Release folder, remove some path in PATH, remove Visual Studio.
                            Recompile and Run from Qt Creator, it show the Visual C++ Runtime Library.
                            Please advise, thanks

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

                              Hmm... Please open your project in Qt Creator and provide screenshots of the following:

                              • (Top menu bar) -> Tools -> Options -> Build & Run -> Compilers
                              • (Top menu bar) ->Tools -> Options -> Build & Run -> Kits
                              • (Left menu bar) -> Projects

                              quote author="vtong" date="1375245456":
                              I just do REcompile with a fresh project from my github:[/quote]

                              Is this the same project that you are trying to run on your other PC? Can you provide a GitHub link?

                              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 last edited by
                                #30

                                I did an experiment by uninstall all Qt from my PC then run the app
                                myapp/app.exe
                                myapp/*dll (all dlls required to run the app)
                                myapp/platforms/qwindows.dll

                                The error message appeared.

                                Then I Re-Install Qt5.1 MingW32
                                The App run OK, withou error message.
                                Do you have any idea?
                                I did check the Path in Environment Variables, don't have any value related to Qt installed folder.

                                1 Reply Last reply
                                0
                                • V Offline
                                  V Offline
                                  vtong
                                  wrote on last edited by
                                  #31

                                  Hi JKSH,
                                  I used Process Monitor program then I found something interesting:

                                  • The Application has error always used files from Qt Install Directory, e.g: platforms.
                                  • I create a similart app, It uses files from directory that I copy.
                                    Here is the situaton, all file in a folder in D drive, Qt Install in C:\Qt:
                                    D:\MyProject
                                    MyApp.exe
                                    *.dll (All required dll: Qt5Core.dll, Qt5Gui.dll,...
                                    platforms/qwindows.dll
                                    MySimilarApp.exe
                                    If I rename Qt5.1 to Qt5.1___ (for example)
                                    MyApp.exe ran with error.
                                    But when I return the name to origial one: Qt5.1, MyApp.exe ran withou error.
                                    MySimilarApp.exe ran without error, don't care the Qt5.1 folder name.

                                  I don't know why this happened.

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

                                    Very strange... I've never seen that before.

                                    You said MySimilarApp.exe is ok. What happens if you re-compile Qwt and MyApp.exe after you uninstalled and reinstalled Qt 5.1?

                                    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 last edited by
                                      #33

                                      [SOLVED]
                                      I solved the problem.
                                      The error caused by some QImage Variables I declared at the top of mainwindow.cpp (after #include, of course).
                                      By moving these variables to mainwindow.hpp, it works perfectly.
                                      Special thanks to:
                                      JKSH for your willingness to support me.
                                      Process Monitor enabled me to captured and isolated the root cause.

                                      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