1. 程式人生 > >Target: x86_64-linux-gnu下實現gcc -m32

Target: x86_64-linux-gnu下實現gcc -m32

暗裝的Ubuntu是64位的想實現32位編譯連結需要安裝X86的庫,為安裝前執行gcc -m32 -o x x.c會提示

In file included from /usr/include/stdio.h:27:0,

                 from push_test.c:12:

/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory

可以執行sudo apt-get install libc6-dev-i386語句安裝庫檔案,需要注意ubnutu要聯網。