help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing the instantiation of templates in a shared object


From: James Kanze
Subject: Re: Forcing the instantiation of templates in a shared object
Date: Sat, 19 Mar 2005 14:13:53 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Paul Pluzhnikov wrote:
> James Kanze <kanze@none> writes:

>>I've tried adding:

>>     template class ConcreteInputTranslator<UTF32LEInputTranslator> ;

> This should be enough and is sufficient to instantiate all
> methods of ConcreteInputTranslator in my trivial test case,
> *provided* the body of all the methods is available.

Not even that -- the functions in question are all virtual, so
as soon as I create an instance I get the.

> If the body is not available, the compiler will not provide a
> definition for obvious reason.

And in fact, that was the problem.  I'd just forgotten to
include the .tcc file in the header.  Being somewhat new to
shared libraries under Linux, and having had a couple of other
problems, due to missing compiler options, I was looking for a
complicated problem, rather than something that simple.

Thank's for the help.

--
James Kanze                                      home: www.gabi-soft.fr
Conseils en informatique orientée objet/
                       Beratung in objektorientierter Datenverarbeitung
9 pl. Pierre Sémard, 78210 St.-Cyr-l'École, France +33 (0)1 30 23 00 34


reply via email to

[Prev in Thread] Current Thread [Next in Thread]