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

时间:2018-11-12 21:44:26

标签: sdl-2 sbcl msys2 quicklisp libffi

在安装带有quicklisp的草图时,我无法解决由于缺少SDL DLL和FFI.H文件而导致的错误。针对该Windows 10特定的问题发布我的解决方案,也许还有其他解决方案。

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

2 个答案:

答案 0 :(得分:3)

这是我要做的,以解决因缺少SDL DLL和FFI.H标头而导致的几个错误。

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/

enter image description here

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:

enter image description here

答案 1 :(得分:0)

在最初的技巧设置之后,MSYS2是一个非常干净的构建环境。我已经切换到此方法,并避免了到处复制dll的麻烦方法:

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

  3. 更新路径以包括:

enter image description here

  1. 在conmumu设置中为msys2任务。这就是我选择的解决方法,有很多方法可以做到这一点,还有更多方法可以解决问题:

    设置CHERE_INVOKING = 1并设置MSYSTEM = MINGW64并设置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. 使用pacboy与:x一起快速安装x64软件包
  4.   

    pacboy -S emacs:x工具链: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/