Question: Guys, would you describe a few things about c++ building blocks, on unix. 

I want to create an application that links against static libs and dynamic libs (.so). 

**Question 1:** *How do I create static library using gcc/g++ ?How do I make my app link against it.*

**Question 2:** *How to specify it in the makefile, linking against static and dynamic libs, assuming that both libraries have header files*

Summary: I have been using makefiles and libraries for years, written by someone else. Thus every time I modified it, I simply cut-and-pasted things around, without really understanding it. Now I want to get down to the ground and understand the building/linking/Creating Makfile process in-depth.

*What is a good book describing these concepts in intimate details?*

Thanks

Answer: 
When I was learning about Linux programming, [Advanced Linux Programming](http://www.advancedlinuxprogramming.com/alp-folder) helped me a lot. You can check Writing and Using Libraries section in [this pdf](http://www.advancedlinuxprogramming.com/alp-folder/alp-ch02-writing-good-gnu-linux-software.pdf). It explains quite a bit about libraries in Linux.
you may want to have a look to this, too: <http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html>