Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int sum(int,int);
  2. int mul(int,int);
  3.  
  4. #include<stdlib.h>
  5. #include<stdio.h>
  6. #include "header.h"
  7. void main(){
  8. printf("sum of 4 & 5 is %d ", sum(5,4));
  9. printf("mul of 4 & 5 is %d ", mul(5,4));
  10. }
  11.  
  12. gcc -c -g file1.c
  13. gcc -c -g file2.c
  14. ar -r libmylib.a file1.o file2.o
  15.  
  16. gcc -c -g mymain.c
  17. gcc -L. -o mymain mymain.o -lmylib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement