Last active
November 10, 2026 10:58
-
-
Save doccaico/4ddac77096f68bee254905ef0d7e6ff6 to your computer and use it in GitHub Desktop.
Chez Scheme: Create an executable on Windows (単独のファイルを扱うバージョン)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "scheme.h" | |
| #include "petite_boot.h" | |
| #include "scheme_boot.h" | |
| #include "app_boot.h" | |
| int main(int argc, char *argv[]) { | |
| Sscheme_init(NULL); | |
| Sregister_boot_file_bytes("petite.boot", (char *)petite_boot, petite_boot_len); | |
| Sregister_boot_file_bytes("scheme.boot", (char *)scheme_boot, scheme_boot_len); | |
| Sregister_boot_file_bytes("app.boot", (char *)app_boot, app_boot_len); | |
| Sbuild_heap("app.boot", NULL); | |
| int status = Sscheme_start(argc, (const char **)argv); | |
| Sscheme_deinit(); | |
| return status; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (printf "Hello from Chez Scheme Single Binary!") | |
| (newline) | |
| (exit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| set CHEZ=C:\Langs\chez-scheme | |
| scheme -q --script build.ss | |
| xxd -i -n petite_boot %CHEZ%\boot\a6nt\petite.boot > petite_boot.h | |
| xxd -i -n scheme_boot %CHEZ%\boot\a6nt\scheme.boot > scheme_boot.h | |
| xxd -i -n app_boot app.boot > app_boot.h | |
| cl /I "%CHEZ%\boot\a6nt" app.c /Fe:app.exe "%CHEZ%\bin\a6nt\csv1041.lib" | |
| endlocal | |
| REM vim: ft=dosbatch fenc=cp932 ff=dos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (make-boot-file "app.boot" '("scheme" "petite") "app.ss") | |
| (exit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment