C++ – Error due to libstdc++

Error due to libstdc++… here is a solution to the problem.

Error due to libstdc++

I wrote a simple “Hello World” C++ program on Fedora 13 that ran fine on Fedora 13.
But when I try to run the same binary on Suse7.3, it gives the error :

ld.so Inconsistency detected: dynamic-link.h: 62: elf_get_dynamic_info: assert! "Bad dynamic tagging" failed!

After that I compiled the same code on Suse7.3 and ran the binary on Fedora13 and then it gave the error :

./a.out: symbol lookup error: ./a.out: undefined symbol: cout

This problem is caused by the libstdc++ library.

Fedora 13 has the libstdc++.so.6.0.13 library.

SUSE 7.3 has libstdc++-3-libc6.2-2-2.10.0.so libraries

How do I create binaries for Suse7.3 and Fedora13?

Solution

You are unlikely to build a binary that can run on both.

If you have no choice but to try, you need to find the packages of the old libraries and install them on your Fedora system. I wouldn’t even consider going the other way.

You’ll need to do a lot of downloads and package installations, so set aside a few hours for this task and the frustrations you’ll encounter often.

It is best to compile one version of the executable on each system

Related Problems and Solutions