This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template function compiling problem (alphaev5-linux)
- To: Toshinao ISHII <ici at qua dot crl dot melco dot co dot jp>
- Subject: Re: template function compiling problem (alphaev5-linux)
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 26 Sep 1998 01:20:41 +-300
- Cc: egcs at cygnus dot com
- References: <199809251232.VAA09483@rothko.qua.srl.melco.co.jp>
Toshinao ISHII <ici@qua.crl.melco.co.jp> writes:
> I have another problem about template. I divided the souce
> into three parts, say poi02.H, poi02.C and main02.C
This won't work. Even when you use -frepo, the definition of a
template *must* be visible in every translation unit that uses that
template. This can only be worked around if you explicitly
instantiate templates in one of the translation units in which they
are defined. The `export' keyword would help, but it is not
implemented yet :-(
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil