public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* More Template Instantiation Trouble
@ 1998-02-08 13:45 David Greene
  0 siblings, 0 replies; only message in thread
From: David Greene @ 1998-02-08 13:45 UTC (permalink / raw)
  To: egcs

I have a file I use to manually instantiate templates.

Some of the templates instantiated there use templates
instantated elsewhere.  For example, a class might
have members that are themselves instances of templated
classes.  The problem is, these "extra" templates get 
instantiated when I instantiate the "main" templates.
The linker (x86/Linux/ELF) then complains about
duiplicate symbols.  This happens regardless of whether
I put these instantiation object files into a library
or just list them on the link line.

I tried compiling with -fno-implicit-templates, but
then _nothing_ get instantated (even the templates
I explicitly instantiate!).  

What's the solution to this problem?  The only one
I've found is to put all the instantiations into
one file and wait half an hour for it to compile.

Does this make sense at all?

Thanks for any help!

                               -Dave


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-08 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-08 13:45 More Template Instantiation Trouble David Greene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).