multiple defintions error

Atif Shahab atif@viewinternet.com.sg
Mon Sep 25 04:03:00 GMT 2000


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
******************************************************



More information about the Gcc mailing list