From 3227929d21416d3ff68443a5257eb6337f84baed Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 31 Dec 2013 00:21:08 +0200 Subject: 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 --- mkspecs/common/winrt_winphone/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 88accb6008..c990122ac6 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -79,7 +79,7 @@ QMAKE_LIBS_NETWORK = QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib -QMAKE_LIBS_QT_ENTRY = -lqtmain /ENTRY:wmainCRTStartup +QMAKE_LIBS_QT_ENTRY = -lqtmain QMAKE_IDL = midl QMAKE_LIB = lib /NOLOGO -- cgit v1.2.3