This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Templates
Am Don, 2003-03-27 um 09.21 schrieb Matthieu Moy:
> Eduardo Cesar Cabrera Flores <eccf at super dot unam dot 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 dot Oltmanns dot Oltmanns at sysde dot eads dot net