gcc
Alexios Chouchoulas
alexios at vennea.demon.co.uk
Thu Jun 26 15:06:45 EEST 1997
On Thu, 26 Jun 1997, Kostas Liakakis wrote:
> Ki omos mporeis... Apla den symferei :-)
Nai, exeis dikio. Skeftomouna allo pragma. Apla den mporeis na oriseis
poia libraries tha kaneis statically link kai poia dynamically me ta -static
kai -dynamic. An kaneis, px, gcc object.o lib1.a lib2.a lib3.a -o executable
tha kanei statically link tis bibliothikes lib[1-3].a alla o,ti allo library
thelei tha to kanei dynamically link. Giati den symferei? Se polles
periptwseis (px to apaitoumeno SO einai asynithisto h den xrhsimopoieitai
arketa wste na dikaiologeitai na einai SO) to static linking orismenwn
bibliothikwn einai kalh idea. An twra arxiseis kai kaneis static link kthnh
opws libc, libX11, libXaw{,3d} klp, katalhgeis me binaries diastasewn
Netscape. :-)
> Telika ena .a arxeio einai san ena matso .o, den exei idiaiterh diafora
> gia ton linker.
Oxi, kai afto einai para poly xrhsimo. Den kserw an exeis kanei compile
thn libc, alla sxedon kathe function einai se diko tou object file. Fantasou
na eprepe na kaneis link kammia 300aria object files se kathe binary. Mprr.
To ar(1) paizei to rolo tou library manager se alla systhmata. Poly xrhsimo,
an kai kaneis pia den to xrhsimopoiei gia ton arxiko tou skopo (archiving).
Oloi paizoun me to safws kalytero tar(1) pia.
> > > /usr/i486-linux/bin/ld: cannot open -lX11: No such file or directory
>
> Apla, exeis mple3ei ligo tis parametrous kai 0eorei to -lX11 san
> ./-lX11.c kai psaxnei na to kanei compile...
Epetrepse mou na diafwnhsw edw... An prosekseis, to programma pou anaferei
to lathos einai o linker, oxi o compiler. O gcc einai para poly eksypnos me
tis parametrous tou. Katalabainei para poly kala oti to -lX11.c einai
linking option (o,ti arxizei me '-' einai PANTA option kai POTE filename,
ektos ki an prohgeitai apo thn parametro '--' kai milame gia GNU programma).
To problhma einai oti den brisketai to static library libX11. Dystyxws o
ld(1) exei kapws kako error reporting kai to parapanw lathos deixnei teleiws
sourealistiko.
> MHN mplekete to ld.so.conf me ton ld. DEN exoun KAMIA sxesh. O ld blepei
> mono tis biblio0hkes kai ta directories pou tou dineis sto command line,
> den koitazei pou0ena allou.
E, koitaei kai sto antistoixo environment variable gia ta sxetika
directories (LD_RUN_PATH).
Alexios Chouchoulas '88 ,88' ,88' alexios at vennea.demon.co.uk
The Unpronounceable One ,o88oooo88ooooo88oo, axc at dcs.ed.ac.uk
--
====================================================================
Gia na mathete pos na xrisimopoiite ton majordomo, stilte e-mail
sto "majordomo at argeas.argos.hol.gr" me 1 grammi sto keimeno: help
Ta archives tis listas einai sto http://www.argos.hol.gr/lists
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================
More information about the Linux-greek-users
mailing list