How to compile a source with "extern"
Marcelo Custodio
marcelocustodio@gmail.com
Tue Mar 8 15:29:00 GMT 2005
Ok, I've already fixed this....But I have a newbie question: what's
the gcc command to build the files and execute them? How could it be a
makefile?
Thanks again!
On Tue, 8 Mar 2005 09:10:49 -0600, Martin York <martin.york@veritas.com> wrote:
>
> In file teste2.c
>
> extern void f1(void); // It must be declared extern in this file aswell
> // before it is defined.
> void f1(){
> printf("Função contida no arquivo teste2.c...\n"); }
>
> // variável global externa
>
> // Need to make sure the compiler knowns it is this x that is extern.
> extern int x;
> int x = 12;
>
>
>
--
----------------------------------------
Marcelo Monteiro Custódio
System Analyst and Developer
DBA Engenharia de Sistemas
More information about the Gcc-help
mailing list