将 Common Lisp Sketch 安装到 Windows 10 中时出现问题

Problems installing Common Lisp Sketch into Windows 10

我在使用 quicklisp 安装 sketch 时遇到了缺少 SDL DLL 和 FFI.H 文件的错误。发布我针对这个 Windows 10 个特定问题的解决方案,也许还有其他解决方案。

我最终在我的 mingw64 环境中使用了 Chocolatey 和 Cmder。

这是我必须做的,以解决丢失 SDL DLL 和 FFI.H header.

的几个错误
1. Install Cmder using Chocolatey: https://chocolatey.org/packages/Cmder
2. Download and copy all the SDL, SDL_image and SDL_ttf DLL's to SBCL's .exe folder:
    a. https://www.libsdl.org/download-2.0.php
    b. https://www.libsdl.org/projects/SDL_image/
    c. https://www.libsdl.org/projects/SDL_ttf/

4. Download and copy the precompiled libffi folders include and .libs to the mingw64:
    a. Download the precompiled from here:
        i. https://proj.goldencode.com/projects/p2j/wiki/Building_and_Installing_libffi_on_Windows
    b. Copy the include and .libs folder here:

经过最初的技巧设置后,MSYS2 是一个非常干净的构建环境。我已经切换到这种方法,避免了到处复制 dll 的混乱方法:

  1. 确保并卸载 python、make、git 和其他您希望在 MSYS 中拥有的元素。 MSYS 与 windows 程序一起工作,但安装了 linux 工具链,并且无法设置像 SDL2 这样的程序来编译软件。
  2. choco install cmdermini 而不是完整的 cmder。这将确保不会与可执行的 bash 命令发生冲突。常规 CMDER 为 windows 安装 git 以及与 MSYS 可执行文件冲突的其他内容。

  3. 要包含的更新路径:

  1. 在 conemu 设置中为 msys2 创建一个任务。这是我确定的方式,有很多方法可以正确地做到这一点,也有更多的方法可以把事情搞砸:

    set CHERE_INVOKING=1 & set MSYSTEM=MINGW64 & set MSYS2_PATH_TYPE=inherit & C:\tools\msys64\usr\bin\sh.exe --login -i -new_console:d: "C:\":C:"C:\tools\msys64\msys2.ico"

  2. MSYS2_PATH_TYPE=inherit 是这里的关键部分,它允许 MSYS2 访问系统 PATH 中的所有可执行文件。如果您通过 pacman 和从其他地方(如 chocolatey)安装了重复的程序,这可能会导致问题。我卸载了所有 bash/gnu/unix windows 程序和命令,现在只使用我从 MSYS2 安装的内容。

  3. 使用带 :x 的 pacboy 快速安装 x64 包
  4. pacboy -S emacs:x toolchain:x SDL2:x SDL2_gfx:x SDL2_image:x SDL2_ttf:x libffi:x

  5. 除了 ZSH 的东西之外,浏览所有这些,使用你喜欢的东西。好东西在这里:https://medium.com/@borekb/zsh-via-msys2-on-windows-3964a943b1ce

  6. 阅读此内容以供参考:https://zyzyz.github.io/en/2017/10/Integrate-MSYS2-into-Cmder/