gemini-2.5-flash-preview-05-20| input-price: 0.15 output-price: 3.5 max-context-length: 128_000 (cost: $0.005) Β· Anfrage: 2025-06-30T08:36:05.181727
Generated by rs-summarizer Version unbekannt
This document outlines the process of cross-compiling Common Lisp applications for Windows from a Linux environment, as successfully implemented for a Raylib-based game.
Abstract:
This article details the comprehensive workflow for cross-compiling Common Lisp programs for Windows using a Linux development setup. It covers the essential steps including setting up a MinGW-w64 toolchain for C code compilation, installing a Windows-native SBCL (Steel Bank Common Lisp) environment within Wine, integrating this Wine-based SBCL as a REPL (Read-Eval-Print Loop) in a Linux Emacs IDE for interactive development, dynamically loading Windows DLLs into a Lisp image, and finally, generating standalone Windows .exe executables. The author highlights the surprising smoothness of the process, noting specific configurations for tools like vend and Sly, and observing differences in path handling and the resulting executable size between Linux and Windows builds.
Summarizing the Process of Cross-compiling Common Lisp for Windows (Note: As this is a text document, starting timestamps are not applicable.)
mingw-w64-toolchain (e.g., pacman -S mingw-w64-toolchain on Arch Linux).x86_64-w64-mingw32-gcc and run via wine ./a.exe..dll by modifying its src/Makefile to specify PLATFORM_OS=WINDOWS and the MinGW compiler..dll using -L"." -lraylib..msi installer for Windows is run using wine.sbcl.exe) runs within Wine, and its *features* list confirms the :WIN32 environment.:device field (e.g., "Z" for Z:/), but conveniently uses / as the path component separator.vend, a Common Lisp dependency manager, facilitates running the Wine-based SBCL as a REPL.vend to access Linux filesystem paths (available through Wine as Z:/), making dependency management seamless.load-shared-object function is used to dynamically load .dll files into the Lisp image.:dont-save t option is crucial when building executables, allowing the Lisp image to run with DLLs from a different location than where they were compiled.build.lisp script leveraging sb-ext:save-lisp-and-die creates the .exe file.