My application crashes with exception 0xc0000409 in ntdll.dll (all according to Windows event viewer) immediately at startup on machines which doesn't have Visual Studio installed. On machines with Visual Studio installed everything works fine. The crash only happens when building with /subsystem:windows. With /subsystem:console everything works fine.
More info: I'm using CMAKE and qt_add_executable(AppName WIN32 ${PROJECT_SOURCES}) for building with /subsystem:windows and qt_add_executable(AppName ${PROJECT_SOURCES}) for building with /subsystem:console.
Any idea of how to find the root cause? I cannot debug since the error isn't reproducible with Visual Studio installed.