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. Qt's g++ builds invalid executables.
Forum Updated to NodeBB v4.3 + New Features

Qt's g++ builds invalid executables.

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 3.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.
  • J Offline
    J Offline
    Jesdisciple
    wrote on last edited by
    #1

    Windows 7 64-bit
    MinGW 4.8 32-bit
    Qt Creator 2.8.1
    I'm not using the Qt libraries in this project.

    Issue history: "Windows Forum: MinGW C++11 app compiles, can't run outside IDE: 0xc000007b":http://forums.windowsforum.org/index.php?showtopic=51273

    Long story short, I have a project which only contains an empty main function - no includes or actual logic. It runs fine inside Qt Creator, but when I run it standalone I get a dialog:

    bq. The application was unable to start correctly (Oxc000007b). Click OK to close the application.

    To test, I tried running the makefile outside of Qt Creator. Lo and behold, I got an executable that worked. But when I tried to put it in Dr. Memory, I was told it's unsupported because it's 64-bit. It was 64-bit because the first g++ in my PATH was from 64-bit MinGW. I used this Batch script to eliminate that inconsistency:
    @setlocal
    set PATH=C:/Qt/Tools/mingw48_32/bin/;%PATH%

    mingw32-make -f Makefile.Debug
    endlocal@
    Now, when I use the script to compile, and then run the resulting executable, I get the same error dialog.

    What can I do about this?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      These windows error codes sometimes do carry information:
      this Error Code means: 0xC000007B STATUS_INVALID_IMAGE_FORMAT ("windows error code document":http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MS-ERREF].pdf )

      This could mean that a 32 bit application tries to load a 64 bit dll.

      You should probably look into this issue with "dependency walker":http://www.dependencywalker.com/ or with "PEStudio":http://winitor.com/.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Somehow the link above does not work. so Here is the full link to the Microsoft Windows Error Code Document:

        @http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MS-ERREF].pdf@

        Copy the text an paste it to a browser! (it will download a pdf document)

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jesdisciple
          wrote on last edited by
          #4

          Apparently it does depend on a 64-bit DLL, but I'm not yet understanding what I can do about it.

          I listed the Dependency Walker results, and my reaction to them, in the linked thread. They didn't seem to lead anywhere useful, but here they are again:

          @ Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
          Error: Modules with different CPU types were found.
          Warning: At least one delay-load dependency module was not found.
          Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.@

          @ API-MS-WIN-CORE-COM-L1-1-0.DLL
          API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
          API-MS-WIN-CORE-WINRT-L1-1-0.DLL
          API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
          API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
          API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
          DCOMP.DLL
          GPSVC.DLL
          IESHIMS.DLL@

          PeStudio:

          @ The PointerToSymbolTable is Invalid (it should be 0)
          The NumberOfSymbols is Invalid (it should be 0)
          The image is NOT digitally signed with a Certificate
          The count (4) of imported Library is Suspicious
          The image imports 2 missing Librarie(s)
          The image Imports 4 Obsolete Symbol(s)
          The image imports 15 Blacklisted Functions (API)
          The image contains an Overlay (Offset: 0x0000D200, Size: 31048 Bytes)
          The Section (Name:.bss) is Empty (zero Byte on the Disk)
          The image does NOT use Data Execution Prevention (DEP) as Mitigation technique
          The image does NOT use Address Space Layout Randomization (ASLR) as Mitigation technique
          The image is Resource-less
          The image uses static Thread Local Storage (TLS)
          The image does NOT use Cookies placed on the Stack (GS) as Mitigation technique
          The image does NOT use Code Integrity
          The image is Terminal Server aware
          The size (64 Bytes) of the MS-DOS Header is standard
          The size (20 Bytes) of the File Header is standard
          The size (224 Bytes) of the Optional Header is standard
          The image has (0) registered Exception Handlers
          The Entry Point (0x000014E0) is in the First Section (Name:.text)
          The image contains 1660 Strings (of at least 5 characters )
          The image is target for a I386 (or higher) Machine
          The image is an Executable
          The expected Operating System Version is 4.0
          The Linker Version is 2.23
          The Image Version is 1.0
          The Subsystem Version is 4.0
          The Export Address Table (EAT) Directory is Empty
          The Resource Directory is Empty
          The Exception Directory is Empty
          The Security Directory is Empty
          The Relocation Directory is Empty
          The Debug Directory is Empty
          The Architecture Directory is Empty
          The Global Pointer Directory is Empty
          The Load Configuration Directory is Empty
          The Bound Import Directory is Empty
          The Delay Loaded Import Directory is Empty
          The COM Runtime Directory is Empty
          The image Imports 66 Symbol(s)
          The image is isolation aware AND should be isolated
          A cave has been detected in the file (Offset: 0x00006A28, Size: 472 bytes)
          A cave has been detected in the file (Offset: 0x00006C54, Size: 428 bytes)
          A cave has been detected in the file (Offset: 0x00007554, Size: 172 bytes)
          A cave has been detected in the file (Offset: 0xFFFFFF30, Size: 208 bytes)
          A cave has been detected in the file (Offset: 0x00008004, Size: 508 bytes)
          A cave has been detected in the file (Offset: 0x00008234, Size: 460 bytes)
          A cave has been detected in the file (Offset: 0x00008420, Size: 480 bytes)
          A cave has been detected in the file (Offset: 0x00008658, Size: 424 bytes)
          A cave has been detected in the file (Offset: 0x0000C0A3, Size: 349 bytes)
          A cave has been detected in the file (Offset: 0x0000C6A7, Size: 345 bytes)
          A cave has been detected in the file (Offset: 0x0000CC62, Size: 414 bytes)
          A cave has been detected in the file (Offset: 0x0000CE38, Size: 456 bytes)
          The image on the disk contains 5121 unused Bytes (Caves)
          The image targets 32-bit Processor
          The image uses Structured Exception Handling (SEH)@

          Imported Libraries (4)
          @libgcc_s_dw2-1.dll,Implicit,4,n/a
          kernel32.dll,Implicit,25,6.1.7601.18229
          msvcrt.dll,Implicit,34,7.0.7601.17744
          libstdc++-6.dll,Implicit,3,n/a@

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            I know my reply is a bit late... But have you been able to solve the issue?

            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