[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ / g++ question



On Mon, Sep 06, 1999 at 02:31:08PM -0400, Adam Wendt wrote:
> Donovan Rebbechi wrote:
> 
> > AFAIK, #including .cpp files is not "standard practice". Or is it ? Am I
> > missing something ?
> >
> > CHeers,
> > --
> > Donovan
> 
> I'm just guessing (because i'm not an experienced programmer) but from
> compiling lots of programs I would guess that normally you would compile the
> .cpp files separatly and then link the .o files or whatever and that is
> where your problem is.  And by not '#include'ing the .cpp files in main.cpp
> the compiler cant tell how to combine the files properly.
Wrong. gcc will pass all objects to linker. I think that the problem is that
you should include template definitions in files which use templates.