C++ export keyword

Alexandre Oliva oliva@dcc.unicamp.br
Tue Sep 15 20:44:00 GMT 1998


Patrik Hagglund <patha@ida.liu.se> writes:

> I can't find any information about gcc and the use of C++ export
> keyword for exporting templates.

export is not supported yet.

> Then I tried -frepo, but collect2 dumped core (egcs-1.1a, SPARC, SunOS
> 5.6).

Strange, I can't reproduce your problem on a similar platform.
Anyway, your use of the template repository mechanism is incorrect.
Although collect2/-frepo will handle template instantiation so that
each template is instantiated only once, it won't be able to do its
job unless each template is defined on at least one translation unit
in which it is used.  Since the function template is only defined in
unix.cc, and unix.cc doesn't use the template, it won't be ever
defined.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc mailing list