做cmu lab1时,在终端运行
gcc -O -Wall -m32 -lm -o btest bits.c btest.c decl.c tests.c
报错
In file included from /usr/include/stdio.h:27:0,
from btest.c:16:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
In file included from /usr/include/stdio.h:27:0,
from decl.c:1:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
搜索得知Ubuntu 64位运行32编译代码时,需要在终端
在终端运行该语句,安装下面的东西即可解决。
sudo apt-get install build-essential module-assistant
sudo apt-get install gcc-multilib g++-multilib