next up previous
Next: Checking in your templates Up: Notes on using the Previous: Creating a templates file

Demangling the template names

When linking the names of the missing class/function instantiations may be printed in a mangled form. To demangle them save the g++ output in a file and use /usr/local/gnu/bin/c++filt.
An example (Using csh) is:

   gmake test.cc >&! g++.out
   /usr/local/gnu/bin/c++filt < g++.out
or using sh
gmake test.cc 2>&1 | /usr/local/gnu/bin/c++filt | tee missing-templates

The c++filt command will translate the following mangled name

getArray__Ct11MaskedArray1Z14PointComponen
to
MaskedArray<PointComponent>::getArray(void)
and because the getArray function is a member function of the MaskedArray class we need to instantiate the whole class (MaskedArray<PointComponent>)



Ralph Marson
Wed Aug 28 17:15:27 MDT 1996