Basic questions on linking static and dynamic libraries

From: Nilo (iamnilo_at_hotmail.com)
Date: 03/09/05


Date: Wed, 09 Mar 2005 15:04:46 +0100

Hi,

I hope this is not too basic for this forum.

Two questions I couldn't really find an answer to in the books I have. I
don't have any kind of disturbing problem, I'm just annoyed not to
understand 100% how it works.

- There don't seem to be any environment variable holding library paths on
my PC (SuSE 9.0). I can still compile and run basic C code, so gcc and my
executables definitely find "libc.so.6 => /lib/i686/libc.so.6" for example.
If I type "env" in bash (same user as I compile with), I get neither
$LD_LIBRARY_PATH nor any other variable holding a /lib or /usr/lib kind of
path. Where are those path stored?

- Why do .a files always seem to be much larger than corresponding .so files
(between 3 and 10 times bigger). Shouldn't there just be a format
difference between those two files, leading to files with a similar size?

-rw-r--r-- 1 root root 13553180 2003-09-23 18:04 libc.a
-rwxr-xr-x 1 root root 1461208 2003-09-24 01:05 /lib/i686
libc.so.6

Thanks in advance,

Nilo



Relevant Pages

  • Re: Using BlockingCollection with Parallel.ForEach
    ... You seem to think you own this forum. ... You can compile them from the command line if you like, ... but it is that person's responsibility to make use of it. ... criticism to be constructive, but I am failing to get through to you. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Need a Good Book
    ... Your top five books, ... will be sent to the Real Hell. ... ...When I get a sufficient number of submissions, I'll compile a list ... Fill what's empty, empty what's full, ...
    (sci.space.history)
  • Re: Fortran Resources (Last Issue)
    ... > I first began to compile this information in 1991, ... > requests on comp.lang.fortran for details of compilers and books on ... It will, Walt Brainerd, willing, ... > remain available on his Web site (and thanks to Walt for hosting this over ...
    (comp.lang.fortran)
  • Re: Need a Good Book
    ... who flew on Apollo 11. ... Your top five books, ... Anyone recommending Wbua Znkfba's bound volume of used toilet paper ... ....When I get a sufficient number of submissions, I'll compile a list ...
    (sci.space.history)
  • Re: Does a 82 year old need $2 million a year?
    ... President Ong asked for the books but they said it takes 50 years to compile, so cannot be "kosong" now, but no guarantee it's not kosong by the time the books are compile ... foreign reserve, paying him S$2 million a year salary is peanut, just ...
    (soc.culture.singapore)