This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to compile a source with "extern"
- From: Marcelo Custodio <marcelocustodio at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 8 Mar 2005 11:28:14 -0400
- Subject: Re: How to compile a source with "extern"
- References: <3340EC9485464A47BDF408B311F7B6DF810FAD@rosxchcln7.enterprise.veritas.com>
- Reply-to: Marcelo Custodio <marcelocustodio at gmail dot com>
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