LibstdC ++ 64-bit and 32-bit versions on one machine

I am trying to cross-compile my software version for a 64-bit platform. Can I install the 32-bit and 64-bit versions of libstdC ++ installed on the same computer without worrying too much about disrupting the installation of Linux. Os - 32-bit ubuntu.

I did not cross-compile earlier and just wanted to check that if I install my CFLAGS and LDFLAGS for the corresponding CPU, I should be fine when I have the correct versions of libstdC ++ installed.

I checked the 64 bit version of ubuntu however this has a symlink

lib64 โ†’ lib

it can ruin the lots, if so on a 32-bit machine, does anyone know how to sort this?

Currently I find the following error:

[exec] /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.2.4/libstdc++.so [exec] /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.2.4/libstdc++.a when searching for -lstdc++ [exec] /usr/bin/ld: skipping incompatible 

etc. before

  [exec] /usr/bin/ld: cannot find -lstdc++ [exec] collect2: ld returned 1 exit status 

Which, apparently, is due to the fact that I do not have a 64-bit version of libstdC ++

+6
c ++ 64bit build-process linker 32-bit
source share
1 answer

Of course you can.

Just put them in /usr/lib and /usr/lib64 respectively.

Unable to test it on Ubuntu , but they get to Fedora directly from the packages:

 [~#] repoquery -q -l libstdc++.i386 /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6.0.10 [~#] repoquery -q -l libstdc++.x86_64 /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.0.10 
+4
source share

All Articles