Just doing a little work this morning making some static libraries and wanted to know why static libraries end with '.a'. No one in my office knew so I thought I would ask around on SO. We are writing code in C++/C/Obj-C
+7
A:
That's just a convention on unix-based systems. Visual Studio (windows) generate .lib files.
In fact I just discovered that there are several other namings : http://en.wikipedia.org/wiki/Library_(computing)#Naming
Klaim
2010-09-17 16:21:18
I would be curious to know the history behind this convention. I wonder if it's documented anywhere?
Mark Ransom
2010-09-17 16:23:09
I thought it might stand for something. Must have been a grad student that thought it was a good idea to give it a one letter extension lol
Shadow
2010-09-17 16:23:33
Yeah I added the link to wikipedia, that's interesting.
Klaim
2010-09-17 16:24:22
+4
A:
It's an archive format (think of .zip or .tar) containing .o object files generated by "ar". The linker just treats it as if the object files were specified individually.
MarkR
2010-09-17 16:24:42
If you specified the .o file individually the linker might include them even if none of their symbols were specified, but with .a files linkers usually only bring in .o files within the archive who are required to satisfy the object being built.
nategoose
2010-09-17 16:34:50