This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to compile a source with "extern"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]