您的位置:首页 > 其它

/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory

2014-01-02 13:55 816 查看
环境 :

Linux centos1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

CentOS release 6.4 (Final)

问题:

64bit系统编译32bit程序,遇到问题

# gcc test.c -m32 -o test

/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory

#yum install glibc-devel.i686

# gcc test.c -m32 -o test

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: cannot find -lgcc_s

#yum install libgcc.i686

# gcc test.c -m32 -o test

#

ok!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐