Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How tell Qt Creator where to look for DLLs? (It loads bad libstdc++-6.dll from SysWOW64)
Forum Updated to NodeBB v4.3 + New Features

How tell Qt Creator where to look for DLLs? (It loads bad libstdc++-6.dll from SysWOW64)

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 2.5k 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.
  • S Offline
    S Offline
    sharevari
    wrote on last edited by
    #1

    I am running Qt Creator 3.0 on Windows 7 64-bit with Qt 5.1.1 32-bit MinGW edition.

    Compiling a project works fine but as soon as I try to debug it, I immediately get the error "During startup program exited with code 0xc0000139." This is apparently a DLL mismatch error of some sort.

    With the help of depends.exe I copied all the DLLs needed into the same dir as the exe and then it ran fine.

    After a lot of trial and error I tracked it down to a copy of libstdc++-6.dll inside C:\Windows\SysWOW64. For some reason, Qt Creator prefers this version to the one in Qt/5.1.1/mingw48_32/bin. If I rename the SysWOW64 version I'm able to launch the program in debug mode inside Qt Creator.

    However, I don't want to be messing around in the Windows system folders if I can avoid it, there must be a better way around this? Can I specify the search order for DLLs that Qt Creator uses somehow?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Adjust the PATH
      http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sharevari
        wrote on last edited by
        #3

        The Qt directories containing the correct DLLs are actually first on the project's Run Environment PATH, but as the linked MSDN article explains, the system folders are searched before the PATH variable.

        Maybe there is no other way around this than to always copy the affected DLL to the output dir before running the executable?

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

          Any idea how libstdc++-6.dll got into your SYSWOW64 folder? That is not a Windows DLL and should never have been placed there in the first place. Any developer that adds things to C:\Windows and its subfolders should be smacked.

          I'd say find the offending program and uninstall it. However, given that it didn't respect Windows system DLL rules, I'm guessing that even after an uninstallation, you'd still need to manually remove libstdc++-6.dll.

          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