This is the mail archive of the
mailing list for the GCC project.
Re: v3 template errors
- To: gcc at gcc dot gnu dot org
- Subject: Re: v3 template errors
- From: Martin Reinecke <martin at MPA-Garching dot MPG dot DE>
- Date: Tue, 29 May 2001 15:11:00 +0200
- Organization: Max-Planck-Institut fuer Astrophysik
I think that the programs in v3template-error.tar.gz
are not completely conforming to standard C++, because
of the definitions of template methods in .C files
which are compiled separately (in SomeTemplate.C and
SimpleList.C). Whenever you have that kind of definition,
it must be preceded by the "export" keyword, or your
programs won't link. This is better explained in
section 13.7 of "The C++ Programming Language (3rd edition)".
In principle the SGI compiler should have complained about
Unfortunately the export keyword is one of the few standard C++
features which have not yet been implemented in gcc, so I fear
this won't help you much. Your best bet is to rearrange the
source code (e.g. move the definitions of the template members
into the headers).
Hope this helps a bit,