//My static library (compiled to .a in OSX) is just the following:
#include<stdio.h>
void HelloWorld()
{
printf("Hello World!\n");
}
//My program (which I link to the above library) is this:
#include <stdio.h>
#include <stdlib.h>
extern void HelloWorld();
int main()
{
HelloWorld();
return 0;
}