Mailing List Archive

Support open source code!


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

Re: *.la and *.a



Darren,

*.la files are text files created by the libtool utility. They are
an abstraction which allows makefiles to work transparently/portably
with systems (e.g. AIX) which have wierd requirements for using
and building shared libraries. 

Linux is a "normal" system, so they are not really required. You
can link against the base *.a/*.so files just as well. 

When a program is compiled, the library is specified on the
command line like "-ltiff". If you specify static linking (not the
default), it will put the code from libtiff.a into the executable.
Otherwise, it will dynamically load libttf.so when the executable
is run. (The dynamic loader will actually load libttf.so.2.2.0, or
a newer version). The system needs to be able to find the .so file
at runtime, so it needs to be in one of the standard locations
(e.g. /usr/lib), a directory listed in /etc/ld.so.conf or
a directory listed in the LD_LIBRARY_PATH environment variable.

-Jake

Darren Cook wrote:
> 
> What are *.la and *.a extensions?
> 
> Comparing two redhat machines the freetype rpm 1.3.1-7 has these two
> extra files in /usr/lib compared to 1.3.1-5:
> -rw-r--r--    1 root     root       199016 Dec 12 13:21 libttf.a
> lrwxrwxrwx    1 root     root           15 Dec 12 13:32 libttf.so ->
> libttf.so.2.2.0
> 
> The link I can make by hand, but I'm wondering if I need the .a file as
> well? There is also a libttf.la there (on both machines).
> 
> Darren
> 
> -----------------------------------------------------------------------
> Next Nomikai Meeting:    Fri, February 16 19:30- Tengu Tokyo Eki Mae
> Next Technical Meeting:  March (date TBA)
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links