Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. //My static library (compiled to .a in OSX) is just the following:
  2.  
  3. #include<stdio.h>
  4.  
  5. void HelloWorld()
  6. {
  7.     printf("Hello World!\n");
  8. }
  9.  
  10. //My program (which I link to the above library) is this:
  11.  
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14.  
  15. extern void HelloWorld();
  16.  
  17. int main()
  18. {
  19.     HelloWorld();
  20.     return 0;
  21. }