This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: template function compiling problem (alphaev5-linux)


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]