path: root/src/winmain/
diff options
authorMaurice Kalinowski <>2013-12-31 00:21:08 +0200
committerThe Qt Project <>2014-01-06 12:44:01 +0100
commit3227929d21416d3ff68443a5257eb6337f84baed (patch)
tree13abfe629b56b4a4033d61cee87bc053ca452048 /src/winmain/
parentbdd3ead8270dfde12b0b4eb57125a22e51ee88ce (diff)
Change entry point for WinRT apps to WinMain
Using wmain causes the problem that the linker seems to create some code around it, which calls ExitProcess. That function however is forbidden by the Windows Store Certification process and hence you cannot publish an application currently. This does not apply to Windows Phone, which links in such a way that this problem does not occur there. With WinMain as the entry point this does not happen and also is the default entry point. Testing locally shows that certification goes fine. Since it does not pass the full command line string, the C-runtime method __getmainargs is used instead. This also gives access to any environment strings which may be passed. Note that MSDN states that this function should only be used for desktop applications. For XAML/C++ scenarios there is no entry function at all, but rather the App object gets instantiated in the default template. But this only works for XAML itself and not for plain C++ applications, probably some other entry wrapper is created on the fly here. Done-with: Andrew Knight <> Change-Id: I8a118eddf6cfeddeca7d676267e979af17123e02 Reviewed-by: Maurice Kalinowski <> Reviewed-by: Friedemann Kleint <> Reviewed-by: Oliver Wolff <>
Diffstat (limited to 'src/winmain/')
1 files changed, 0 insertions, 1 deletions
diff --git a/src/winmain/ b/src/winmain/
index b0771caa55..1aca8996ad 100644
--- a/src/winmain/
+++ b/src/winmain/
@@ -17,7 +17,6 @@ win32-msvc*:QMAKE_CXXFLAGS_DEBUG *= -Z7
winrt {
- QMAKE_LFLAGS += /ENTRY:wmainCRTStartup
SOURCES = qtmain_winrt.cpp
} else {
SOURCES = qtmain_win.cpp