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

Error during startup.

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 3.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.
  • W Offline
    W Offline
    Wnt2bsleepin
    wrote on last edited by
    #1

    Hello, I am new to QT and I am having an error with running a very simple program. It is giving me an error upon startup.

    During startup program exited with code 0xc0000139

    I downloaded version 5 and installed the package "here ":http://qt-project.org/downloads for MingGW

    Any help is appreciated.

    1 Reply Last reply
    0
    • W Offline
      W Offline
      Wnt2bsleepin
      wrote on last edited by
      #2

      Here is what I get when I try to run the program from the executable

      !https://dl.dropbox.com/u/4177525/gameerror.jpg(Game Error)!

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hostel
        wrote on last edited by
        #3

        Your exe has to be deploy with dependencies dll's. libstdc++-6.dll is library from mingw. Run Dependency Walker and check what dll you need deploy with exe and copy it to same folder where you have the exe. dlls you will find in lib and probably bin folders from Qt SDK.

        1 Reply Last reply
        0
        • W Offline
          W Offline
          Wnt2bsleepin
          wrote on last edited by
          #4

          Seems like it's missing two dlls. I haven't made any changes to the program but I assumed that if I ran it I would just get an empty window.

          !https://dl.dropbox.com/u/4177525/gameerror2.jpg(Error 2)!

          It doesn't run from QT Creator or by manually running it. Where do I get these files and how do I add them?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MuldeR
            wrote on last edited by
            #5

            According to your screenshot, you are not missing two DLL's, but only one (referenced twice) has a problem.

            Also, from your error message, it seems that you do NOT miss "libstdc++6.dll", but an incompatible version was used and that one is lacking a required entry point! Thus the application won't start.

            This usually happens when you do NOT properly deploy the suitable DLL that your application was built with (for), but some DLL of the same name happens to be found somewhere on the user's system (e.g. in "Windows" or "Windows\System32"). So, at runtime, the "wrong" DLL is being used. Make sure that you always deploy all the required DLL's and that you put them directly into the "install" folder where your EXE file is located!!!

            BTW: libstdc++-6.dll should be located in the "bin" folder of your MinGW installation. If there are multiple MinGW installations on your system, make sure you pick the DLL from the one that you used to compile your EXE!

            My OpenSource software at: http://muldersoft.com/

            Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

            Go visit the coop: http://youtu.be/Jay...

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Wnt2bsleepin
              wrote on last edited by
              #6

              I am not sure which dlls my application was built for. It's just the default QT program, which I expected to open and make a window.

              I found the dll in a MingGW folder and copied to System32 and the QT creator MingGW. I then cleaned and rebuilt the entire application, but it is still throwing the error.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MuldeR
                wrote on last edited by
                #7

                Please do not copy any application-specific DLL's into the "System32" directory - or into any other system-wide directory! Doing so will lead to the problem known as "DLL Hell". And it's actually exactly what you are experiencing right now: The program will load a "wrong" DLL at runtime, just because a DLL that happens to have the same name as the required DLL (but is not the required DLL file!) happens to be located in one of the "system-wide" directories. Instead you should ALWAYS deploy the required DLL's directly into your app's install folder (i.e. where your EXE file is located), so [1] you can be sure that your application will load the correct DLL at runtime and [2] you can be sure that you don't compromise any other applications.

                BTW: If you compiled the app yourself, you know what MinGW you used to compile it and you should be able to grab the right DLL from your MinGW installation folder. If you got the app as a pre-compiled binary, it should have shipped with the right DLL. If not, it will be hard to figure out what MinGW version had been used to create it...

                BTW²: Dependency Walker has a very useful option to show the full path of each DLL file. Use it!

                --

                Also keep in mind the DLL search order:
                [quote]1. The directory from which the application loaded, i.e. where the EXE file is located
                2. The system directory (e.g. C:\Windows\System32)
                3. The 16-bit system directory (e.g. C:\Windows\System)
                4. The Windows directory (e.g. C:\Windows)
                5. The current directory
                6. The directories that are listed in the PATH environment variable[/quote]

                My OpenSource software at: http://muldersoft.com/

                Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

                Go visit the coop: http://youtu.be/Jay...

                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