I've attempted to compile for Windows using the instructions on the SRB2 wiki, both inside the WSL and via MSYS2, and I have the same problem in both. Here's the entire output of my compilation attempt:
Attempt 1 output
$ make clean && MINGW64=1 make -j 4
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Creating dependency file, depend.dep
win32/win_dbg.c:24:10: fatal error: win_main.h: No such file or directory
24 | #include "win_main.h"
| ^~~~~~~~~~~~
compilation terminated.
../comptime.sh .
d_netfil.c:114:8: error: unknown type name 'I_mutex'
114 | static I_mutex downloadmutex;
| ^~~~~~~
d_netfil.c: In function 'CURLAbortFile':
d_netfil.c:1367:9: error: implicit declaration of function 'I_lock_mutex' [-Wimplicit-function-decla
ration]
1367 | I_lock_mutex(&downloadmutex);
| ^~~~~~~~~~~~
d_netfil.c:1367:9: warning: nested extern declaration of 'I_lock_mutex' [-Wnested-externs]
d_netfil.c:1368:9: error: implicit declaration of function 'I_unlock_mutex'; did you mean '_unlock_f
ile'? [-Wimplicit-function-declaration]
1368 | I_unlock_mutex(downloadmutex);
| ^~~~~~~~~~~~~~
| _unlock_file
d_netfil.c:1368:9: warning: nested extern declaration of 'I_unlock_mutex' [-Wnested-externs]
make[1]: *** [Makefile:752: ../objs/Mingw64/Release/d_netfil.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make: *** [Makefile:8: all] Error 2
I looked for `win_main.h` and found that it was deleted in commit 2ce980325 from a couple years ago, so I'm not sure what exactly I'm doing wrong.
Just in case, I also tried without the MINGW64=1 flag (it was unclear to me if it was necessary) and got this output:
Attempt 2 output
$ make clean && make -j 4
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
Creating dependency file, depend.dep
Created dependency file, depend.dep
Detected a Windows system, compiling for 64-bit MinGW SDL2...
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
Creating dependency file, depend.dep
Created dependency file, depend.dep
Detected a Windows system, compiling for 64-bit MinGW SDL2...
..\comptime.bat .
Linking srb2kart-saturn.exe...
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(png.c.obj):png.c:(.text+0x516): undefined reference to `_setjmp'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xdf4): undefined reference to `_setjmp'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xea2): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xec1): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xf5c): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xf7f): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0x11a1): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:630: ../bin/Mingw64/Release/srb2kart-saturn.exe] Error 1
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make: *** [Makefile:8: all] Error 2
Either way, compilation for Windows fails. Is there another process that's supposed to be used?
I've attempted to compile for Windows using the instructions on the SRB2 wiki, both inside the WSL and via MSYS2, and I have the same problem in both. Here's the entire output of my compilation attempt:
<details><summary>Attempt 1 output</summary>
<pre>
$ make clean && MINGW64=1 make -j 4
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Creating dependency file, depend.dep
win32/win_dbg.c:24:10: fatal error: win_main.h: No such file or directory
24 | #include "win_main.h"
| ^~~~~~~~~~~~
compilation terminated.
../comptime.sh .
d_netfil.c:114:8: error: unknown type name 'I_mutex'
114 | static I_mutex downloadmutex;
| ^~~~~~~
d_netfil.c: In function 'CURLAbortFile':
d_netfil.c:1367:9: error: implicit declaration of function 'I_lock_mutex' [-Wimplicit-function-decla
ration]
1367 | I_lock_mutex(&downloadmutex);
| ^~~~~~~~~~~~
d_netfil.c:1367:9: warning: nested extern declaration of 'I_lock_mutex' [-Wnested-externs]
d_netfil.c:1368:9: error: implicit declaration of function 'I_unlock_mutex'; did you mean '_unlock_f
ile'? [-Wimplicit-function-declaration]
1368 | I_unlock_mutex(downloadmutex);
| ^~~~~~~~~~~~~~
| _unlock_file
d_netfil.c:1368:9: warning: nested extern declaration of 'I_unlock_mutex' [-Wnested-externs]
make[1]: *** [Makefile:752: ../objs/Mingw64/Release/d_netfil.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make: *** [Makefile:8: all] Error 2
</pre>
</details>
I looked for `win_main.h` and found that it was deleted in commit 2ce980325 from a couple years ago, so I'm not sure what exactly I'm doing wrong.
Just in case, I also tried without the `MINGW64=1` flag (it was unclear to me if it was necessary) and got this output:
<details><summary>Attempt 2 output</summary>
<pre>
$ make clean && make -j 4
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
Creating dependency file, depend.dep
Created dependency file, depend.dep
Detected a Windows system, compiling for 64-bit MinGW SDL2...
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src'
Detected a Windows system, compiling for 64-bit MinGW SDL2...
Creating dependency file, depend.dep
Created dependency file, depend.dep
Detected a Windows system, compiling for 64-bit MinGW SDL2...
..\comptime.bat .
Linking srb2kart-saturn.exe...
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(png.c.obj):png.c:(.text+0x516): undefined reference to `_setjmp'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xdf4): undefined reference to `_setjmp'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xea2): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xec1): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xf5c): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0xf7f): undefined reference to `__imp___iob_func'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libs/libpng-src/projects/libpng64.a(pngerror.c.obj):pngerror.c:(.text+0x11a1): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:630: ../bin/Mingw64/Release/srb2kart-saturn.exe] Error 1
make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src'
make: *** [Makefile:8: all] Error 2
</pre>
</details>
Either way, compilation for Windows fails. Is there another process that's supposed to be used?
Not entirely sure why, but it appears that some compiler and linker flags get omitted (it tries to build without sdl2).
Could you try running make clean and make -j 4 separately?
Not entirely sure why, but it appears that some compiler and linker flags get omitted (it tries to build without sdl2).
Could you try running `make clean` and `make -j 4` separately?
Unfortunately, I'm a fool, and I looked directly past the bold "close the MSYS2 window and open mingw32.exe" instruction on the page. Oops, sorry. Having actually followed the instructions, I was able to get it to build without MINGW64=1 (I get same error if I do include the flag).
However, when I try to launch it, I get error messages complaining about missing libcurl.dll, exchndl.dll, discord-rpc.dll, and libgme.dll. I can find the third and fourth in the libs/dll-binaries/x86_64/ directory, but is there something different I have to do to get the other two?
Unfortunately, I'm a fool, and I looked directly past the bold "**close the MSYS2 window and open mingw32.exe**" instruction on the page. Oops, sorry. Having actually followed the instructions, I was able to get it to build without `MINGW64=1` (I get same error if I do include the flag).
However, when I try to launch it, I get error messages complaining about missing libcurl.dll, exchndl.dll, discord-rpc.dll, and libgme.dll. I can find the third and fourth in the `libs/dll-binaries/x86_64/` directory, but is there something different I have to do to get the other two?
using mingw32 will build a 32bit executable, so the correct dlls would be in libs/dll-binaries/i686/
alternatively they are included in the release zips from https://github.com/Indev450/SRB2Kart-Saturn/releases/tag/v8.3 or with a vanilla kart install
using mingw32 will build a 32bit executable, so the correct dlls would be in libs/dll-binaries/i686/
alternatively they are included in the release zips from https://github.com/Indev450/SRB2Kart-Saturn/releases/tag/v8.3 or with a vanilla kart install
Yep, that works! I also I think I just independently figured out the same thing you put into the readme file 10 minutes ago, that I could use the 64-bit msys2 executable and replace the architecture with x86_64 in the package name to get the 64 bit build to work. I was just coming here to say that I had managed it when I saw the new commit, haha
Thank you for taking a look :3
Yep, that works! I also I think I just independently figured out the same thing you put into the readme file 10 minutes ago, that I could use the 64-bit msys2 executable and replace the architecture with `x86_64` in the package name to get the 64 bit build to work. I was just coming here to say that I had managed it when I saw the new commit, haha
Thank you for taking a look :3
Sure thing!
glad it helped and everything worked now c:
figured it could use some better explaining since the linked instructions weren't particularly clear about it (srb2 does not "support" 64bit windows builds after all)
Sure thing!
glad it helped and everything worked now c:
figured it could use some better explaining since the linked instructions weren't particularly clear about it (srb2 does not "support" 64bit windows builds after all)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I've attempted to compile for Windows using the instructions on the SRB2 wiki, both inside the WSL and via MSYS2, and I have the same problem in both. Here's the entire output of my compilation attempt:
Attempt 1 output
$ make clean && MINGW64=1 make -j 4 make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src' Detected a Windows system, compiling for 64-bit MinGW SDL2... make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src' make[1]: Entering directory '/d/Documents/SRB2Kart-Saturn/src' Creating dependency file, depend.dep win32/win_dbg.c:24:10: fatal error: win_main.h: No such file or directory 24 | #include "win_main.h" | ^~~~~~~~~~~~ compilation terminated. ../comptime.sh . d_netfil.c:114:8: error: unknown type name 'I_mutex' 114 | static I_mutex downloadmutex; | ^~~~~~~ d_netfil.c: In function 'CURLAbortFile': d_netfil.c:1367:9: error: implicit declaration of function 'I_lock_mutex' [-Wimplicit-function-decla ration] 1367 | I_lock_mutex(&downloadmutex); | ^~~~~~~~~~~~ d_netfil.c:1367:9: warning: nested extern declaration of 'I_lock_mutex' [-Wnested-externs] d_netfil.c:1368:9: error: implicit declaration of function 'I_unlock_mutex'; did you mean '_unlock_f ile'? [-Wimplicit-function-declaration] 1368 | I_unlock_mutex(downloadmutex); | ^~~~~~~~~~~~~~ | _unlock_file d_netfil.c:1368:9: warning: nested extern declaration of 'I_unlock_mutex' [-Wnested-externs] make[1]: *** [Makefile:752: ../objs/Mingw64/Release/d_netfil.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/d/Documents/SRB2Kart-Saturn/src' make: *** [Makefile:8: all] Error 22ce980325from a couple years ago, so I'm not sure what exactly I'm doing wrong.Just in case, I also tried without the
MINGW64=1flag (it was unclear to me if it was necessary) and got this output:Attempt 2 output
Either way, compilation for Windows fails. Is there another process that's supposed to be used?
Not entirely sure why, but it appears that some compiler and linker flags get omitted (it tries to build without sdl2).
Could you try running
make cleanandmake -j 4separately?Unfortunately, I'm a fool, and I looked directly past the bold "close the MSYS2 window and open mingw32.exe" instruction on the page. Oops, sorry. Having actually followed the instructions, I was able to get it to build without
MINGW64=1(I get same error if I do include the flag).However, when I try to launch it, I get error messages complaining about missing libcurl.dll, exchndl.dll, discord-rpc.dll, and libgme.dll. I can find the third and fourth in the
libs/dll-binaries/x86_64/directory, but is there something different I have to do to get the other two?using mingw32 will build a 32bit executable, so the correct dlls would be in libs/dll-binaries/i686/
alternatively they are included in the release zips from https://github.com/Indev450/SRB2Kart-Saturn/releases/tag/v8.3 or with a vanilla kart install
Yep, that works! I also I think I just independently figured out the same thing you put into the readme file 10 minutes ago, that I could use the 64-bit msys2 executable and replace the architecture with
x86_64in the package name to get the 64 bit build to work. I was just coming here to say that I had managed it when I saw the new commit, hahaThank you for taking a look :3
Sure thing!
glad it helped and everything worked now c:
figured it could use some better explaining since the linked instructions weren't particularly clear about it (srb2 does not "support" 64bit windows builds after all)