undefined symbol + shared object + template

K

kamit

I have not done much programming with template so please excuse my
inexperience. I have function defined in one of the class in this
manner. This function is being showed as an undefined function in the
shared object that we have created. I am getting a link time error that
symbol not found while creating an execuable.

template <Class T> long
ITLDOdbFactory_T<Class Y>::connection_count (const string& db_name)
throw (ITLDOdbConnectException)
{
return queue->connections();
}

I did an nm on the object file of this code and its not there. I don't
know why this happens or what is suppose to happen. I was wondering if
somebody can give me the heads up so that I can then find my way...

tia...
 
J

John Harrison

kamit said:
I have not done much programming with template so please excuse my
inexperience. I have function defined in one of the class in this
manner. This function is being showed as an undefined function in the
shared object that we have created. I am getting a link time error that
symbol not found while creating an execuable.

template <Class T> long
ITLDOdbFactory_T<Class Y>::connection_count (const string& db_name)
throw (ITLDOdbConnectException)
{
return queue->connections();
}

I did an nm on the object file of this code and its not there. I don't
know why this happens or what is suppose to happen. I was wondering if
somebody can give me the heads up so that I can then find my way...

tia...

It's in the FAQ, it's also (I reckon) the single most commonly asked
question in this group.

http://www.parashift.com/c++-faq-lite/templates.html#faq-35.8

john
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top