1824728 Members
4376 Online
109674 Solutions
New Discussion юеВ

aCC templates

 
Jorge Mora
Occasional Contributor

aCC templates

Hello,

I'm porting an application from hp10.20 cfront to hp11.0
aCC but it's giving me unresolved symbols for the templates. In specific, I have a class defined as:

template
class eConv {
...
const T gVal(const RWCString &);
}

And another class as:
class uConv : public eConv
{
...
}

where UT is declared as a enum list.
When I use in the code the uConv class:
uConv a;
and compile it, I get the following unresolved symbols:

eConv::gVal(const RWCString &) (code)

I really don't know what is wrong. I already try all the
compile flags pertaining to
templates but I get the same
results. Any help would be greatly appreciated.

--Jorge
2 REPLIES 2
Adam J Markiewicz
Trusted Contributor

Re: aCC templates

Hi

Just guessing:
Where do you have the definition of the method gVal()? I see only the declaration.

I belive that definition (not only the declaration) of the method should be accessible, when you use eConv, or you should enforce instantiation of this class somhere, where this definition is accessible. Doing it by simple:
class eConv;
should be enough.

Good luck
Adam
I do everything perfectly, except from my mistakes
Jeremy Lemaire
New Member

Re: aCC templates

Hello,

Have you tried using aCC -AA?

-Jeremy