更新时间:2023-09-30 12:33:04
要让 Ubuntu Server 12.04 LTS 64 位编译 gcc 4.8 32 位程序,您需要做两件事.
To get Ubuntu Server 12.04 LTS 64-bit to compile gcc 4.8 32-bit programs, you'll need to do two things.
确保所有 32 位 gcc 4.8 开发工具都已完全安装:
Make sure all the 32-bit gcc 4.8 development tools are completely installed:
sudo apt-get install lib32gcc-4.8-dev
使用 -m32 标志编译程序
Compile programs using the -m32 flag
gcc pgm.c -m32 -o pgm