fzhou
fzhou

Reputation: 417

g++ -m32 can not find libstdc++ on debian amd64

I got the following error when compiling a simple hello world program on debian amd64 wheezy(testing) with g++ -m32:

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

I don't have any problems with gcc -m32. I also installed lib32stdc++ package, but it does not seem to work. Thanks.

Upvotes: 14

Views: 13081

Answers (2)

M_D_K
M_D_K

Reputation: 346

Pretty sure you need to install g++-4.6-multilib (it would appear you already have gcc-4.6-multilib).

Upvotes: 20

ismail
ismail

Reputation: 47572

Try installing ia32-libs-dev package.

Upvotes: 4

Related Questions