Some questions about SDL/

i have download a simple demo and built it on two different systems.
actually i build SDL on systems.
the first system is a plain stock mandrake 9.2 system.
the second is a uclibc gentoo system.
on the mandrake system

ldd /usr/lib/
gives: => /lib/i686/ (0x40086000) => /lib/ (0x400a9000) => /usr/X11R6/lib/ (0x400ac000) => /usr/X11R6/lib/ (0x400c2000) => /usr/X11R6/lib/ (0x40117000) => /usr/X11R6/lib/ (0x401fa000) => /lib/i686/ (0x40209000) => /lib/i686/ (0x40259000)
/lib/ => /lib/ (0x80000000) => /usr/X11R6/lib/ (0x40389000) => /usr/X11R6/lib/ (0x40392000)
on the glibc gentoo system
ldd /usr/lib/ => not found (0x00000000) => /lib/ (0x00000000) => /lib/ (0x00000000) => /usr/X11R6/lib/ (0x00000000) => /usr/X11R6/lib/ (0x00000000) => /lib/ (0x00000000) => /lib/ (0x00000000)
/lib/ => /lib/ (0x00000000)

why libstdc++ … this one causes me the most problems
when i try to compile the demo as c files (gcc)
when i compile the same ass cc (g++) the problems go away.
(some sharpy wlll now doubt say hey just compile them as
c++ files!) but what is going on? why is libstdc++ showing up.


james osburn wrote:

ldd /usr/lib/

Don’t use ‘ldd’! This is a common mistake that almost everybody makes.
ldd prints the entire tree of dependancies. In other words: ldd also
shows the dependancies of the dependancies.
The correct way to find out what an ELF binary really needs is by
using the following command:
objdump -p | grep NEEDED