-
Notifications
You must be signed in to change notification settings - Fork 3
Failed to build Windows exe via ./ubuntu64-ia32-pkgs.sh and ./ubuntu64-ia32-make.sh #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you try just using the pre-built mingw libs for windows? |
Ubuntu was one of the hackiest back then to compile for. I'm sure it's all out dated now and needs to be tweaked. Today with the advent of containers it would be much easier to just build a container to do this in a more reproducible way. |
Yes, I did tried the pre-built mingw libs but then again there was no working script to compile the source code of the game on Windows (unless you build it via Visual Studio but the project dependencies for the Visual Studio project file are also wrong so building it this way needs tweaking as well) and that is why I tried to create the game executable via Ubuntu. |
I haven't used Visual Studios in ages but it shouldn't be too far off if you're able to update them. It has been a while now but I'm pretty sure you have to use the other pre-built mingw libs folder to target windows. The script in that repo should work on windows and linux to target mingw. I do not believe you should be using this repo to target windows... See: https://github.com/ForsakenX/forsaken-libs-mingw32/blob/master/make.sh Ubuntu and Visual Studios most likely just need some minor tweaks to get updated. To test it out, I just downloaded, built, and ran all the libs and the game on OSX without issues. |
Finally got around to trying to build it on osx using the pre-built mingw folder with the latest version mingw64 and winehq from homebrew. Note, the pre-built folder must be named mingw (I added a warning for this now) and you must have any required dll files there as well (hence The game definitely compiles and runs using mingw now... I haven't tried with the original mingw.org (32bit) version but it should work just same if I'm able to get this far with mingw64. This is the patch to Forsaken that you might require as well: diff --git a/math_error.c b/math_error.c
index f14cf05..b65b1f6 100644
--- a/math_error.c
+++ b/math_error.c
@@ -18,6 +18,8 @@ static char * MathErrStrings[] = {
"Total Loss of significance",
"Partial Loss of significance",
};
+// TODO: on mingw64 `matherr` seems to be defined already causing an issue?
+#if defined(WIN32) && defined(_matherr)
#ifdef WIN32
int __cdecl _matherr(struct _exception * except)
#else
@@ -95,6 +97,7 @@ int matherr(struct exception * except)
}
return 0;
}
+#endif
int DebugMathErrors( void )
{ Can you try to get to this point and see how it works out for you on Windows and/or a Linux VM? |
Also the changes I made to the mingw-libs folder are in a branch while we iron this out: https://github.com/ForsakenX/forsaken-libs-mingw32/compare/mingw64-updates?expand=1 |
I want to point out again so it's clear that you CAN compile ON WINDOWS using MINGW just fine. So please try that out and let me know how it goes. |
Are you still planning to work on this? |
Uh oh!
There was an error while loading. Please reload this page.
I have build the libs in Ubuntu. Then I have removed libs/lib/libSDL* and -lSDLmain from libs/lib/pkgconfig/sdl.pc as described in the README.md file. Now when I run ./ubuntu64-ia32-pkgs.sh I get the following error in the output:
The text was updated successfully, but these errors were encountered: