2

Trying to build UltraDefrag.

Sounds pretty simple, but as soon as you add a rc.o to the link objects of your binary, it will use the 32 bit version of comctl32.dll triggering a 0xc0000007 error on program startup.

This is a known mingw64 bug, but as the bug had no replies since 2011, I need a workaround for this (the program need to not use cygwin.dll, so I can’t use cygwin).

Any ideas ?

user2284570
  • 2,891
  • 3
  • 26
  • 74

1 Answers1

1

This can happen if the application manifest explicitly specifies the 32-bit version of common controls

i.e. the manifest contains

<dependentAssembly>
<assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    processorArchitecture="x86"
    publicKeyToken="6595b64144ccf1df"
    language="*"
/>

You need to change the processorArchitecture to:

processorArchitecture="*"

If that is the cause of your problem, this is not a MinGW-w64 bug.

jturney
  • 2,510
  • 1
  • 17
  • 24
  • ok, there’s a manifest included by default in the project, indeed. – user2284570 Dec 21 '15 at 19:20
  • When you try starting your 64-bit application with wrong manifest, you may also get error `The application was unable to start correctly (0xc000007b). Click OK to close the application.` and exception `Unhandled exception at 0x000007F8EE9C1E80 (ntdll.dll) in MyApp.exe: 0xC000007B: %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0x.` – izogfif Mar 20 '17 at 17:38