This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: multiple defintions error
- To: Jan Dvorak <johnydog at go dot cz>
- Subject: Re: multiple defintions error
- From: Atif Shahab <atif at viewinternet dot com dot sg>
- Date: Mon, 25 Sep 2000 19:11:20 +0800 (SGT)
- cc: gcc at gcc dot gnu dot org
That worked. And I can see why since by defining static we're linking to
the locally included copy of the functions. However, just out of
curosity, is there another way too. Or should I use this technique
whenever I encounter this problem. Also, the program I'm writing has to
run real time so any performance penalty by doing this?
On Mon, 25 Sep 2000, Jan Dvorak wrote:
> On Mon, Sep 25, 2000 at 04:17:49PM +0800, Atif Shahab wrote:
> > a.h contains some general inline funtions that I would like to be use
> > in b.c and c.c. However when I do that the linker complains of multiple
> > defintions.
> ...
> > Is there a neater way of doing this?
> Declare such functions as 'static'.
>
> Jan Dvorak <johnydog@go.cz>
>
--
Atif Shahab
Network Engineer
ViewInternet.com
Office Tel: +65 232 8877
DID: +65 232 8625
Office Fax: +65 232 8638
www.viewinternet.com.sg
******************************************************
Check your email from anywhere using www.viewemail.com
******************************************************