比我为一台旧的 MS-DOS 机器编写程序更有趣。我使用 Linux (Fedora 19) 作为我的开发机器和 OpenWatcom 1.9 来编译我的代码。
现在,我想在我的项目中使用 FreeType (2.5.2),但我无法让它使用 OpenWatcom。像文档建议的那样运行make setup watcom
不起作用,它仍然会自动检测到 unix 系统:
$ make setup watcom
FreeType build system -- automatic system detection
The following settings are used:
platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).
cd builds/unix; /bin/sh ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating ftconfig.h
config.status: executing libtool commands
make: *** No rule to make target `watcom'. Stop.
使用./configure --host=i286-pc-msdos
也不会改变任何事情。问题似乎是 FreeFype 构建系统只与 GCC 进行交叉编译。我真的必须在 DosBox 中设置一个完整的构建环境,还是可以说服 FreeType 使用 OpenWatcom 而不是 GCC?
不幸的是,在互联网上找不到太多东西。看起来几乎没有人再使用 DOS 了……