[NTLUG:Discuss] file types in /usr/lib
Fred James
fredjame at fredjame.cnc.net
Tue Nov 28 13:29:10 CST 2006
Richard Geoffrion wrote:
>Richard Geoffrion wrote:
>
>
>>What does one call files in the /usr/lib directory that end in ".a"?
>>What kind of files are they?
>>
>>I know that .so files are Shared Object files.. but what are .a files?
>>
>>
>>
>>
>Why do I seem to find the answer AFTER I've posted???
>
>"...They're libraries (collections of .o files, basically). Most
>libraries live in /usr/lib. When you specify "-lm" to cc/gcc at link
>time, it reads that as "use a library named 'm'" and then expands 'm' by
>wrapping 'lib' and '.a' around it to make 'libm.a' (which it finds in
>/usr/lib)."
>
>Thanks everyone!
>
>
Richard Geoffrion
"... find the answer AFTER I've posted ..." - I do that all the time.
Sometimes I think it is the process of formulating the question that
unlocks the answer, but I really don't have a clue.
Additional thought(s) ...
(a) the "file" command reveals that these files are of the "current ar
archive" type
(b) "man ar" returns the man pages for AR(1) which states "ar - create,
modify, and extract from archives" and further states "The GNU ar
program creates, modifies, and extracts from archives. An archive is a
single file holding a collection of other files in a structure that
makes it possible to retrieve the original individual files (called
members of the archive)."
Hope that helps
Regards
Fred James
More information about the Discuss
mailing list