Mail Archives: djgpp/1999/05/07/08:17:52
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 -