template function compiling problem (alphaev5-linux)

Alexandre Oliva oliva@dcc.unicamp.br
Sat Sep 26 00:52:00 GMT 1998

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
Universidade Estadual de Campinas, SP, Brasil

More information about the Gcc mailing list