I might try this next, will check out and try to build it tomorrow
Shame that there’s no way to run ./configure on native windows though, I’ll have to use MSYS2
Imho maintainers should just keep a set of pre-made header-files for a Windows compiler, a huge portion the work configure does is because we historically had:
- Bad compilers (that lacked stdlib features)
- Lacked package managers (so we need to detect versions instead of just specifying used libraries for the program)
- The mess of various nix/linux distros having differing paths (/bin or /local/bin or /usr/local/bin or whatever?) and nix binaries lacked a standardized way to just locate "themselves"
In contrast, Windows programs mostly just make an API call to detect where they live and then just load files from relative paths, this also allows for side-by-side installations of varying versions instead of multiple builds (Yes, some programs sadly needed installers but that's just bad engineering, whilst many programs have portable variants).
Considering Mac programs also are self contained I guess those also have some sane API's for program self-location.
Yes, I do realize that much of the centralization of programs harkens back to Unix multi-user paradigms with centralized management but personal computers has been the norm for some almost 40 years at this point (Even if we've moved to web mainframes instead).
Gauche that is hosted on this site can do it. It does by statically linking the entire Gauche system so may not be the best option. Besides Chez (compiling to native code) that sibling comments mentioned, other options are CHICKEN and Gambit compiling to C (CHICKEN docs provide instructions to even cross-compile[0]).
I've always liked bigloo. It's probably the most pragmatic of the schemes in my opinion. It never gets the attention that chicken and gambit get, though, and I've always wondered why.
Oh, right, I forgot about that one. As I remember, it's a good recommendation.
I'm guessing it doesn't get much chatter due to INRIA being not very good at promotion of the stuff they do, and Bigloo doesn't have the academia-industry-matrimonial push that e.g. Pharo has received.
I've found Chicken reasonably good at compiling to a standalone executable on Linux. Because of how it works I imagine you can get it to work with msys too.
i am fairly sure chicken can do this (never used it on windows myself but the homepage lists all three major platforms). it worked great for building executables on linux and it had a good ecosystem of packages.
The best way I've found to make a standalone executable is to compile my scheme program into a .boot file and embed it, along with Chez's .boot files, into a small C program that then calls the scheme program.