This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how can I solve this template problem?
- From: John Love-Jensen <eljay at adobe dot com>
- To: 변용덕 <ydbyun at lge dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 25 Apr 2003 06:58:21 -0500
- Subject: Re: how can I solve this template problem?
Hi,
It appears that your foo.hh does not include foo.cc at the end of that
header file.
The routines in foo.cc are DECLARATIONS.
I know, they look suspiciously like DEFINITIONS, but they are not. They are
defined when they are instantiated.
Templates are like that. (So are inline functions.) For general use, they
belong in header files.
--Eljay