libc.a and libc.so, libc.so.1libc.so.2, where is my library?

libc.a and libc.so, libc.so.1libc.so.2, where is my library?

Post by Steve Donova » Thu, 08 Jan 1998 04:00:00



Hi,
  I'm trying to compile on a solaris system after doing a fresh os
install with developer bundles and c/c++ WS Pro compilers. /usr/lib
contains libc.so but no libc.a, <whereis libc.a> points to libc.so, but
my makefiles fail because they can't find the correct .a library files.
Where am I going wrong? What's the difference between the two? And, why
doesn't /usr/lib contain all my .a libraries? Any help would be
appreciated. I'm new to solaris development and am having a really hard
time setting up my environment to compile.

Very frustrated,

Steve

 
 
 

libc.a and libc.so, libc.so.1libc.so.2, where is my library?

Post by Senthilvel Rangaswam » Thu, 08 Jan 1998 04:00:00



> Hi,
>   I'm trying to compile on a solaris system after doing a fresh os
> install with developer bundles and c/c++ WS Pro compilers. /usr/lib
> contains libc.so but no libc.a, <whereis libc.a> points to libc.so, but
> my makefiles fail because they can't find the correct .a library files.
> Where am I going wrong? What's the difference between the two? And, why

.a files are static libraries. The code from these libraries are put into
the final executable. .so files are shared objects meaning, the libraries
are required at run time. Advantage, is a smaller executable.

..Senthil

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate the successful termination
of their C programs."  
                                                      -- Robert Firth
************* Remove "NOSPAMS" to reply. ***************************