This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Templates
- From: "Ajay Bansal" <Ajay_Bansal at infosys dot com>
- To: "Matthias Oltmanns" <Mathias dot Oltmanns dot Oltmanns at sysde dot eads dot net>,"Matthieu Moy" <Matthieu dot Moy at imag dot fr>
- Cc: <gcc-help at gcc dot gnu dot org>,<eccf at super dot unam dot mx>
- Date: Thu, 27 Mar 2003 16:46:35 +0530
- Subject: RE: Templates
Still, if possible,
Can somebody post a working template example built with "--frepo
-fno-implicit-templates"
-----Original Message-----
From: Matthias Oltmanns
[mailto:Mathias dot Oltmanns dot Oltmanns at sysde dot eads dot net]
Sent: Thursday, March 27, 2003 2:13 PM
To: Matthieu Moy
Cc: gcc-help at gcc dot gnu dot org; eccf at super dot unam dot mx
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