forked from mirrors/0ad
fix for immediate exit in autobuilt EXE
(problem was the vc7 linker stripping out stuff that we needed) This was SVN commit r5149.
This commit is contained in:
@@ -477,6 +477,9 @@ function setup_main_exe ()
|
|||||||
-- required since main.cpp uses main instead of WinMain and subsystem=Win32
|
-- required since main.cpp uses main instead of WinMain and subsystem=Win32
|
||||||
"/ENTRY:mainCRTStartup",
|
"/ENTRY:mainCRTStartup",
|
||||||
|
|
||||||
|
-- see wstartup.h
|
||||||
|
"/INCLUDE:_wstartup_InitAndRegisterShutdown",
|
||||||
|
|
||||||
-- delay loading of various Windows DLLs (not specific to any of the
|
-- delay loading of various Windows DLLs (not specific to any of the
|
||||||
-- external libraries; those are handled separately)
|
-- external libraries; those are handled separately)
|
||||||
"/DELAYLOAD:oleaut32.dll",
|
"/DELAYLOAD:oleaut32.dll",
|
||||||
@@ -836,10 +839,12 @@ function setup_tests()
|
|||||||
package_add_extern_libs(used_extern_libs)
|
package_add_extern_libs(used_extern_libs)
|
||||||
|
|
||||||
if OS == "windows" then
|
if OS == "windows" then
|
||||||
|
|
||||||
-- from "lowlevel" static lib; must be added here to be linked in
|
-- from "lowlevel" static lib; must be added here to be linked in
|
||||||
tinsert(package.files, source_root.."lib/sysdep/win/error_dialog.rc")
|
tinsert(package.files, source_root.."lib/sysdep/win/error_dialog.rc")
|
||||||
|
|
||||||
|
-- see wstartup.h
|
||||||
|
tinsert(package.linkoptions, "/INCLUDE:_wstartup_InitAndRegisterShutdown")
|
||||||
|
|
||||||
elseif OS == "linux" then
|
elseif OS == "linux" then
|
||||||
|
|
||||||
tinsert(package.links, {
|
tinsert(package.links, {
|
||||||
|
|||||||
Reference in New Issue
Block a user