gcc -c source.c    
-> will produce an object file
ar -cr libYourLibName.a source.o 
you can add as many object files as you want with different options "man ar"
<this is your static library>
you might want to create an index for the library by
ranlib libYourLibName.a
an archive with an index sppeds up your linking.

-----Original Message-----
From: Vimol [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 6:12 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: HOW TO CREATE STATIC LIBRARY??


I am trying to create static library using GCC.  I could not find the option

to do this. 
HOW TO CREATE STATIC LIBRARY??

Kvimol



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to