SOLVED: GCC questions

John Tsiombikas (Nuclear / the Lab) nuclear at siggraph.org
Fri Nov 21 23:21:40 EET 2003


Marios wrote:
> Ευχαριστώ,
> Τελικά η επιλογή -lm δούλεψε. Γιατί όμως πρέπει να γίνει link? Δεν αρκεί το
> header ώστε να καταλάβει ο compiler τι να κάνει? 

Exm... allo o compiler allo o linker, o compiler kserei ti na kanei, ama kaneis 
include, o linker oxi. basika mathe ligo ta basika tou ti ginete gia na ftiaxtei 
ena programma prin arxiseis na programmatizeis.
I diadikasia paei os eksis:

Source File --[compiler]--> Object File --[linker]--> executable

to kathe source file ginete compile ksexorista se mia seira apo object files pou 
periexoun kodika mixanis profanos, o linker meta mazeyei ola ta object files pou 
tou doseis kathos kai tyxon bibliothikes pou xreiazese kai tis kanei link gia na 
bgalei to teliko ektelesimo. Opote prepei na tou peis poies bibliothikes 
xreiazese na kanei link.

-- Nuclear / the Lab --




More information about the Linux-greek-users mailing list