Linking out a .a library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux