HELP : gcc compilation for TEMPLATE HANDLING

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat Apr 1 00:00:00 GMT 2000


> was using the gcc compiler for compiling my programs which use
> internal templates . with the default option -fno-external-templates
> . while linking the programs i got a lot of symbol refersncing
> errors and they were for the templates only .

> i cud not understand how to fix this problem using #pragma interface in my 
> header files which use templates.
> 	please cud u help me on this issue.

I'm not sure I can help; you did not say what processor and operating
system you are using gcc on. On Linux and other ELF-based systems, I
recommend to forget about -fno-external-templates, and trust the
instantiation mechanism provided by the compiler. At latest, the
linker will remove duplicate instantiations should they happen.

Regards,
Martin



More information about the Gcc-help mailing list