While building 32-bit executable file in 64-bit Linux I get crt1.o: No such file even with the -m32 flag

╄→尐↘猪︶ㄣ 提交于 2020-01-15 03:54:27

问题


My Linux Server information is:

[root@centos nan]# uname -a
Linux centos 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

By default, the gcc will generate the 64-bit executable file, so I use the "-m32" flags to build 32-bit executable file.

After running the following command:

[root@centos nan]# gcc -m32 -o a a.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status  

So how to build 32-bit executable file in 64-bit Linux?

来源:https://stackoverflow.com/questions/21724540/while-building-32-bit-executable-file-in-64-bit-linux-i-get-crt1-o-no-such-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!