Templates
Matthias Oltmanns
Mathias.Oltmanns.Oltmanns@sysde.eads.net
Thu Mar 27 08:48:00 GMT 2003
Am Don, 2003-03-27 um 09.21 schrieb Matthieu Moy:
> Eduardo Cesar Cabrera Flores <eccf@super.unam.mx> writes:
>
> > How to compile multiples files source code with templates classes and
> > functions in a makefile?
>
> When you use templates, gcc needs to have all the template-related
> code in the .h file.
>
Thats right but it's not the point Eduardo talked about. As i
understand, he separates the template declaration from the definitions
by placing the definition in a .C file *AND* includes the .C file from
the .h file.
For me this way it works fine as long as i place the header and template
definitions files together in my include directories and do not mix them
with my regular source files.
Don't try to compile the template definition file. It should be enough
to just use them.
cu
Matthias
> --
> Matthieu
--
Matthias Oltmanns
Tel: 04421-1543-274
mail: Mathias.Oltmanns.Oltmanns@sysde.eads.net
More information about the Gcc-help
mailing list