What is a file with extension .a?

Blub picture Blub · May 11, 2011 · Viewed 109.2k times · Source

I downloaded this: https://github.com/mongodb/mongo-c-driver

And now I'm trying to use it inside my C program, but I don't know what to do with the generated .a files. What are they? I couldn't find any information, not even in the GCC manual.

And I built it like so:

  scons --c99

Also, can I use C99 libraries with my C89 program?

Answer

GWW picture GWW · May 11, 2011

.a files are static libraries typically generated by the archive tool. You usually include the header files associated with that static library and then link to the library when you are compiling.