Linking out a .a library
gruik@libertysurf.fr
gruik@libertysurf.fr
Thu Feb 12 14:43:00 GMT 2004
Hi,
I'm currently writing a library that I will soon implement
in a PHP module.
But PHP needs that all libraries have to be linked by the -l
option.
I made inquiries about this and i saw that, for exemple, a
-lxyz option refers to a binary object file (kind of .o)
beginning with "lib" and ending with ".a".
I have succeeded in compiling a such libxyz.a file with this
command :
gcc -c libxyz.c -o libxyz.a
But now, my library is growing and i need to develop
separate .c/.h modules and linking them together into the .a
file
Is it possible?
Because i'm frightend that if i do something like this :
"gcc -o libxyz.a libxyz.o xxx.o yyy.o zzz.o",
libxyz.a will be an executable file and won't be linkable..
********** PROTEGEZ VOS E-MAILS !**********
Avec Tiscali SuperMail, vos e-mails en toute sécurité !
Anti Spam personnalisable
Anti Virus actualisé en permanence
et de nombreux bonus...
Pour en savoir plus, rendez-vous sur http://www.tiscali.fr/supermail/
More information about the Gcc-help
mailing list