delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/21/04:01:18

Date: Sat, 21 Jul 2001 11:00:53 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <2593-Sat21Jul2001110052+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
In-reply-to: <20010720192958.28775.00000394@ng-cu1.news.cs.com>
(andyclifton AT cs DOT comNOSPAM)
Subject: Re: "Inline" functions in C header/source files
References: <20010720192958 DOT 28775 DOT 00000394 AT ng-cu1 DOT news DOT cs DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: andyclifton AT cs DOT comNOSPAM (Andrew Clifton)
> Newsgroups: comp.os.msdos.djgpp
> Date: 20 Jul 2001 23:29:58 GMT
> 
> Both files will compile fine. When I try to link them into an executable,
> however, I get a multiple-definition link error.

Compile with optimizations, and the problem will go away, I think.
GCC doesn't inline unless you optimize, so you have more than one
definition of the function in that case.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019