473,327 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Problem with templates...

I have created a template class with its implementation in a .cpp file
and its declaration in a .h
Compilation finishes successfully and i get errors during linking with
unresolved externals. The
reported externals are methods of the template class. If i put the
implementation of these methods
in the header file, after the declaration of the template class then
everything goes fine.
What could be wrong. I have the feeling that it could be something really
easy that i'm missing
at the moment.

Jul 19 '05 #1
3 1361
i forgot to mention that i'm using Visual Studio 6.0

Jul 19 '05 #2
Kostas Katsamakas <km**@csd.auth.gr> wrote in message
news:bl**********@nic.grnet.gr...
I have created a template class with its implementation in a .cpp file
and its declaration in a .h
Compilation finishes successfully and i get errors during linking with
unresolved externals. The
reported externals are methods of the template class. If i put the
implementation of these methods
in the header file, after the declaration of the template class then
everything goes fine.


In the header is where they are supposed to be. The compiler can't compile
the implementations of the template class's member functions for different
template parameters unless it can see the source code for the functions at
all the places the template is used.

DW

Jul 19 '05 #3
Kostas Katsamakas wrote:
I have created a template class with its implementation in a .cpp file
and its declaration in a .h
Compilation finishes successfully and i get errors during linking with
unresolved externals. The
reported externals are methods of the template class. If i put the
implementation of these methods
in the header file, after the declaration of the template class then
everything goes fine.
What could be wrong. I have the feeling that it could be something really
easy that i'm missing
at the moment.


http://www.parashift.com/c++-faq-lit...html#faq-34.12
http://www.parashift.com/c++-faq-lit...html#faq-34.14

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nanookfan | last post by:
Hi all, I'm having a bizarre problem converting XML files to HTML using an XSLT. The problem is only occuring in my Netscape 7.0 browser. What makes it more bizarre is that it is only...
7
by: Andy Fish | last post by:
Hi, I'm stuck with an XSL problem - can anyone give me any hints? I have some XML with nested formatting tags like this: <text> this is plain <bold> this is bold
5
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the...
11
by: ree32 | last post by:
I have a problem with XSL sorting. The problem is that I need to create a 2 column table so I am using this. <xsl:apply-templates select="//Photo"> </xsl:apply-templates> With template...
13
by: Winbatch | last post by:
Hi, If this should be directed to another group, please let me know... I've been working with templates for a few weeks and have been able to develop some nice code on solaris using the Forte C++...
11
by: Rolf Barbakken | last post by:
I have an xml with records like this one: <a:response> <a:href>http://server/public/sol/comp/1049306.eml</a:href> <a:propstat> <a:status>HTTP/1.1 200 OK</a:status> <a:prop>...
4
by: dwergkees | last post by:
Hi, Got a litte problem here. I'm trying to create a XSLT file that will do a transformation from WordML format (MS Word XML format, see...
6
by: B. Williams | last post by:
I have a problem dealing with class template where I was to write a class and after submitting the class, this is the feedback I got back from the instructor. I don't really understand it. Can...
8
by: patrik.nyman | last post by:
Consider the following document: <?xml version="1.0"?> <!DOCTYPE test> <test> <list type="index"> <item>A</item> <item>B</item> <item>C</item> <cb/>
6
by: pauldepstein | last post by:
Let double NR( double x, double(*)(const double&) f ) be the signature of a Newton-Raphson function NR. Here, f is a function which returns a double and accepts a const double&. The aim of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.