title: How to create a static library with g++?
body: <p>Can someone please tell me how to create a static library from a .cpp and a .hpp file? Do I need to create the .o and the .a? I would also like to know how can I compile a static library in and use it in other .cpp code. I have <code>header.cpp</code>, <code>header.hpp .</code> I would like to create <code>header.a</code>. Test the header.a in <code>test.cpp</code>. I am using g++ for compiling.</p>