Template Instantiation
David Greene
greened@eecs.umich.edu
Mon Feb 9 11:54:00 GMT 1998
On Mon, 9 Feb 1998, Joe Buck wrote:
> > CXXFLAGS = -DDEBUG=0 -DLINUX_LIBC6 -pipe -frtti -Wno-reorder \
> > -Wno-unused
> >
> > I get lots and lots of undefined symbols, all of them from
> > templates.
>
> I didn't state something because I assumed you knew it: the compiler
> must see the definitions of your template functions, not just their
> declarations. Definitions must be visible at the point of use. With
> or without -frepo, the compiler and linker won't go looking in other
> files for template definitions.
Ack! How did I forget that?! Duh...
Thanks for your help!
-Dave
More information about the Gcc
mailing list