0

我正在尝试让sdl quake在我的 64 位 linux 系统上构建。它在我的 32 位 linux 系统上构建和运行良好。我得到的错误是:

d_copy.S:28: Error: invalid instruction suffix for `push'

伴随着一堆类似的错误。我假设我应该能够使用 -m32 标志进行构建,并将其构建为 32 位二进制文​​件。这对我来说没问题。

我将“-m32”附加到 Makefile 中的 CFLAGS,并尝试再次构建,但现在我得到:

gcc -DPACKAGE=\"sdlquake\" -DVERSION=\"1.0.9\"  -I. -I.      
-g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DSDL -DELF -m32 -c cd_sdl.c
In file included from /usr/include/SDL/SDL_main.h:26:0,
             from /usr/include/SDL/SDL.h:30,
             from cd_sdl.c:8:
/usr/include/SDL/SDL_stdinc.h:34:23: fatal error: sys/types.h: No such file or directory
compilation terminated.
make: *** [cd_sdl.o] Error 1

我想我可能只是在这里遗漏了一些明显的东西,因为我没有那么多地使用 -m32 标志。操作系统是 Ubuntu。

4

1 回答 1

2

您需要 32 位版本libc-dev来执行此操作。

使用 Ubuntu 的最快方法:

sudo apt-get install libc6-dev-i386

于 2013-09-18T01:21:50.857 回答