diff options
Diffstat (limited to 'win/tcl.m4')
-rw-r--r-- | win/tcl.m4 | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -415,8 +415,15 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # Specify linker flags depending on the type of app being # built -- Console vs. Window. + # + # We need to pass -e _WinMain@16 so that ld will use + # WinMain() instead of main() as the entry point. We can't + # use autoconf to check for this case since it would need + # to run an executable and that does not work when + # cross compiling. Remove this -e workaround once we + # require a gcc that does not have this bug. LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" - LDFLAGS_WINDOW="-mwindows ${extra_ldflags}" + LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" else SHLIB_LD="link -dll -nologo -incremental:no" SHLIB_LD_LIBS="user32.lib advapi32.lib" |