www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/07/08:17:52

From: david DOT stegbauer AT cz DOT opel DOT com
X-Lotus-FromDomain: GMCZECHIA AT EDSHUBEUROPE
Sender: david DOT stegbauer AT cz DOT opel DOT com
To: jud AT tminet DOT com
cc: djgpp AT delorie DOT com
Message-ID: <C125676A.00434DC4.00@derumg01.cyberlink.eds.com>
Date: Fri, 7 May 1999 12:16:56 +0000
Subject: Re: ASAP: class header files
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com


Shaggs wrote:
> I keep getting errors saying stuff like:
> undefined reference to myclass::myclass(void)
> But its defined in the header, and the code is in the .cpp source

Are you constructors or other methods "inline"? If yes, you have to
compile with optimisation - otherwise inline functions will not be
expanded inline nor compiled as standalone functions. I have this
experience with gcc.

Undefined reference has nothing to do with compiler, it is linker
error message. So compiler read your headers (as you can).

David


- Raw text -


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