From e1e06872d800a7a4cedcb997ab58267d3819d501 Mon Sep 17 00:00:00 2001 From: risvh <67486979+risvh@users.noreply.github.com> Date: Sun, 24 Jul 2022 20:52:21 +0800 Subject: [PATCH 1/2] Fixed linking order of libpng and libz --- game/platforms/SDL/Makefile.MinGWCross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/platforms/SDL/Makefile.MinGWCross b/game/platforms/SDL/Makefile.MinGWCross index 2a86b3a..7075abd 100755 --- a/game/platforms/SDL/Makefile.MinGWCross +++ b/game/platforms/SDL/Makefile.MinGWCross @@ -33,7 +33,7 @@ PLATFORM_LINK_FLAGS_HEADLESS = -lmingw32 -mconsole -mwindows -lwsock32 -lwinmm - PLATFORM_LIBJPEG_FLAG = -ljpeg # not used for some builds -PLATFORM_LIBPNG_FLAG = -lz -lpng +PLATFORM_LIBPNG_FLAG = -lpng -lz # All platforms but OSX support g++ and need no linker hacks From 64b9d4c0d959681faa3fc60c61e409c86c224dec Mon Sep 17 00:00:00 2001 From: risvh <67486979+risvh@users.noreply.github.com> Date: Sun, 24 Jul 2022 20:59:24 +0800 Subject: [PATCH 2/2] Static linking I am less certain of this way, but its the only way I got the game to compile without complaining about missing dlls. Revert it if it breaks anything or if there is a better way. --- game/platforms/SDL/Makefile.MinGWCross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/platforms/SDL/Makefile.MinGWCross b/game/platforms/SDL/Makefile.MinGWCross index 7075abd..f79bfec 100755 --- a/game/platforms/SDL/Makefile.MinGWCross +++ b/game/platforms/SDL/Makefile.MinGWCross @@ -18,7 +18,7 @@ # static lib flag needed to link compiled objs against miniupnp -PLATFORM_COMPILE_FLAGS = -DWIN_32 -DSTATICLIB +PLATFORM_COMPILE_FLAGS = -DWIN_32 -DSTATICLIB -static `sdl-config --static-libs` # need various GL libraries, winmm, and portaudio