Here's a step-by-step description of how I build static libs.
Let's say I wanted to create a static lib that contains a function: println(char*). I'll use only 1 function in my example for simplicity's sake. This function just prints a string and adds a carriage return at the end.
1. I create a new Static Library project. How you do this depends on what IDE you're using. Both MSVC and DevC++ support static library projects. MSVC generates .lib files and DevC++ generates .a files. Let's just say the output is printline.lib
2. I create this header file.
3. I create the implementation.
void println( char* c ) ;
4. I build the project. Your static library should be created (printline.lib or whatever).
void println( char* c )
printf( "%s\n", c ) ;
5. Now I create a new project and create my main source file that uses my println() function. Notice it includes the println.h file.
6. Link the printline.lib file and build your project.
int main(int argc, char *argv)
println( "This is a line!" ) ;