Tuesday, December 05, 2006

The True Meaning of libx.a Files

I don't really know C very well, so I was surpirsed (and delighted) when I finally learned what all those libx.a files are. For example, if you have mysql installed on your system, go take a look in the mysql/lib directory. You should see a bunch of files ending in .a . These are archive files containing compiled C code, basically they are the same thing as a java .jar file. Who knew?

If you want to check the contents of the arhive you can use the [nm] command. Like [nm libmysqlclient.a]

Want to know if the arhive has a specific function? [nm libmysqlclient.a | grep mysql_query]

No comments: