Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 gcc 4.8 在 RHEL 7 64 位上编译一个 32 位 C 应用程序。我收到编译器错误/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory。我需要做什么才能编译和链接 32 位应用程序?
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
要让 RHEL 7 64 位编译 gcc 4.8 32 位程序,您需要做两件事。
确保已完全安装所有 32 位 gcc 4.8 开发工具:
sudo yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 ncurses-devel.i686
使用 -m32 标志编译程序
gcc pgm.c -m32 -o pgm