64位系统下GCC静态编译32位程序:
gcc -o hello hello.c -static -m32
64位系统加-m32编译32位程序的时候,出现错误:/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory。这是缺少库:apt-get install lib32ncurses5-dev、apt-get install libc6-dev-i386
gcc -o hello hello.c -static -m32
64位系统加-m32编译32位程序的时候,出现错误:/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory。这是缺少库:apt-get install lib32ncurses5-dev、apt-get install libc6-dev-i386

本文介绍在64位系统中使用GCC编译32位程序时遇到的错误及其解决方法。主要讨论了如何通过安装特定的32位库来解决编译过程中出现的fatal error问题。

3198

被折叠的 条评论
为什么被折叠?



