This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: HELP : gcc compilation for TEMPLATE HANDLING
- To: madhur_sharma at hotmail dot com
- Subject: Re: HELP : gcc compilation for TEMPLATE HANDLING
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Tue, 14 Mar 2000 21:40:09 +0100
- CC: gnu at gnu dot org, help-gcc at gnu dot org
- References: <200003141921.OAA19609@delysid.gnu.org>
> 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