[ale] c++, dynamic linking etc.

Bjorn Dittmer-Roche bjorn at sccs.swarthmore.edu
Mon Feb 9 15:24:31 EST 2004


Hey all,

I've compiled a c++ program and ran ldd on it:

        libm.so.6 => /lib/libm.so.6 (0x40023000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40045000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4004d000)
        libc.so.6 => /lib/libc.so.6 (0x4009d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I expect (and want) to see libstdc++, but I don't. Is it being statically
linked? How can I avoid that? I've looked at the gcc manual and all I can
find is stuff about using NO standard libraries, which makes it very
difficult to compile things. So, how can I make sure libraries are
dynamically linked?

Ultimately what I'm trying to do, BTW, is release a program in binary form
only without violating (L)GPL, but I also want it to be compatible with as
many distro's as possible.

thanks,

        bjorn



More information about the Ale mailing list