CentOS x86_64上g++ 编译 连接32位demo程序

[root@localhost ~]# yum list glibc

[root@localhost ~]# yum install glibc.i686

提示有问题:

The GPG keys listed for the "CentOS-7 -Base - 163.com" repository are already installed but they are not correctfor this package.
Check that the correct key URLs are configured for this repository.

解决方法:

rpm -import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

[root@localhost ~]# yum installglibc-devel.i686

[root@localhost ~]# yum list libgcc

[root@localhost ~]# yum install libgcc.i686

[root@localhost ~]# g++ -m32 hello.c

当 g++ -m32 hello.c 时还是报错

[root@localhost ~]#yum install libstdc++-static.i686

[root@localhost ~]#yum install libstdc++.i686

成功



你可能感兴趣的:(CentOS x86_64上g++ 编译 连接32位demo程序)