1
votes

When I try to compile my code:

g++ -m32 code.cpp

I get an error:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/6.2.1/libstdc++.so when searching for -lstdc++ /usr/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status

I have installed:

gcc-6.2.1-2.fc24.x86_64

gcc-c++-6.2.1-2.fc24.x86_64

glibc-devel-2.23.1-10.fc24.i686

libstdc++-devel-6.2.1-2.fc24.x86_64

How to fix it?

1

1 Answers

2
votes

The solution for me was:

sudo dnf install libstdc++-static libstdc++-static.i686

But you might also need

sudo dnf install libstdc++-devel libstdc++-devel.i686