Search code examples
windows-7mingw32

My application runs on WinXP but fails to start on Win7


I compiled my application on Linux via MinGW (32-bit). My application runs as expected on Windows XP (SP2 & SP3, 32-bit OS), but it fails on Windows 7 (SP1, 64-bit OS). It throws this message:

The application was unable to start correctly (0xc0000142). Click OK to close the application

How to solve this?


Solution

  • Use Dependency Walker to trace which DLL is missing. Load the Exe in depends and press F7 to start the profiler.

    enter image description here

    Click here ok to start profiling:

    enter image description here

    After you get the error message you should see missing DLLs shown in Depends.exe.

    enter image description here