gcc and some static libs

From: Markus Wenke (M.Wenke_at_web.de)
Date: 08/27/04


Date: Fri, 27 Aug 2004 14:43:37 +0200

Hi,

I want to create a program with gcc (g++). In this prog most of the
static libs should be linked static. At the moment ldd shows this:
   ldd test:
       libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4001b000)
       libm.so.6 => /lib/libm.so.6 (0x400d3000)
       libc.so.6 => /lib/libc.so.6 (0x400f6000)
       libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4022c000)
       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

but I want that ldd says this:
   ldd test:
       libc.so.6 => /lib/libc.so.6 (0x400f6000)
       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

If I use "-static" all libs are linked static, and the result is to big,
besides the gcc prefer the dynamic libs.

What can I do?

thanks in advance

Markus



Relevant Pages

  • Re: List of tools for C development in Linux.
    ... | You develop Linux apps in C/C++ on Linux? ... | e.g ldd displays which libraries are linked in. ... ld - finish where gcc left off ... | Often there are so many good tools its easy to overlook one which might ...
    (comp.os.linux.development.system)
  • How to link with /lib/libc.so.6 in Fedora Core 1?
    ... My OS is Fedora Core 1 with gcc version 3.3.2, ... /lib/tls/libc.so.6 after compilation. ... $ ldd ttt ...
    (comp.os.linux.development.apps)
  • gcc and some static libs
    ... I want to create a program with gcc. ... static libs should be linked static. ... At the moment ldd shows this: ...
    (comp.os.linux.development.apps)
  • Re: openssl on solaris 10/sparc buggy?
    ... > thomas@azalin:~$ ldd `which openssl` ... Builds of OpenSSL 0.9.7g and 0.9.8 using gcc and the ... Chris ...
    (comp.unix.solaris)