我正在尝试编译避难所通过其生成文件,使用 MinGW...我使用了错误的编译器吗?
MinGW 似乎卡在了“$(BUILD):”中的方括号上......而 MinGW 中的方括号是 Unix / Bash 的东西......
process_begin: CreateProcess(NULL, basename C:/Users/Andy/Desktop/Asylia-master, ...) failed.
'[' is not recognized as an internal or external command,
我需要 Cygwin 来运行它吗?
或者进行一些我不知道的简单编辑,以便 MinGW 可以正确运行 makefile?
哦...MinGW 已经好几年没有更新了...如果这是问题所在,我想我唯一的解决方案就是安装 Cygwin 的 gcc-g++,然后弄清楚如何使用它来编译东西?
答案1
在 Cygwin 64 位上。
$ wget https://github.com/Quent42340/Asylia/archive/master.zip
$ unzip master.zip
Archive: master.zip
dcef5e0bc1d5e8de891a9f6b5a538cd7c1a70283
creating: Asylia-master/
...
creating: Asylia-master/wiki/
finishing deferred symbolic links:
Asylia-master/droid/assets/audio -> /home/quentin/Projects/Asylia/audio
Asylia-master/droid/assets/data -> /home/quentin/Projects/Asylia/data
Asylia-master/droid/assets/fonts -> /home/quentin/Projects/Asylia/fonts
Asylia-master/droid/assets/graphics -> /home/quentin/Projects/Asylia/graphics
最后四个是断开的链接,因为它们不应该是绝对链接,而应该是相对链接
Asylia-master/audio == /home/quentin/Projects/Asylia/audio
Asylia-master/data == /home/quentin/Projects/Asylia/data
Asylia-master/fonts == /home/quentin/Projects/Asylia/fonts
Asylia-master/graphics == /home/quentin/Projects/Asylia/graphics
无论如何,我们也可以忽略构建的问题
$ make
...
built ... Asylia-master
$ ls -lrt
total 49M
...
-rwxrwxr-x+ 1 Marco Kein 38M Dec 27 22:39 Asylia-master.exe
从 Xterm 运行
$ ./Asylia-master.exe
该软件包仅直接依赖于 SDL2 共享库
$ cygcheck ./Asylia-master.exe | grep "^ D"
D:\cygwin64\bin\cygwin1.dll
D:\cygwin64\bin\cygSDL2-2-0-0.dll
D:\cygwin64\bin\cygSDL2_image-2-0-0.dll
D:\cygwin64\bin\cygSDL2_mixer-2-0-0.dll
D:\cygwin64\bin\cygSDL2_ttf-2-0-0.dll
因此需要以下包
$ cygcheck -cd |grep SDL2
libSDL2-devel 2.0.7-1
libSDL2_2.0_0 2.0.7-1
libSDL2_image-devel 2.0.2-1
libSDL2_image2.0_0 2.0.2-1
libSDL2_mixer-devel 2.0.2-1
libSDL2_mixer2.0_0 2.0.2-1
libSDL2_ttf-devel 2.0.14-1
libSDL2_ttf2.0_0 2.0.14-1
当然还有cygwin-devel
编译make
器
gcc-core 7.3.0-3
gcc-g++ 7.3.0-3