RE: Gcc libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks everybody for inputs. Now I'll return to my original question. 

Linking by gcc is done in such a way that library names are stored with
their version number intact. What I mean is that say I build a program
test.cpp with gcc.

On doing ldd, I get the following output,

ldd ./a.out
        libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 (0x40014000)
        libm.so.6 => /lib/i686/libm.so.6 (0x400dc000)
        libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x400fe000)
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


This means that the end machine should have libstdc++.so.5. Generally my
experience with other machines is such that one links against the
un-versioned library name:
 
    libstdc++.so
 
That name will be a link to a specific version of the library:
 
    libstdc++.so -> libstdc++.so.4 or libstdc++.so -> libstdc++.so.5

But that is not the case on Linux. 

What I wonder is that how shared libraries are versioned on Linux?

thanks in Advance
Ajay




_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux