Re: How to compile a source with "extern"

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

 



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@xxxxxxxxxxx> 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


[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