This is the mail archive of the gcc@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]

Re: multiple defintions error



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


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