• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Yet another unresolved external symbol error.

Thought I had it sorted and then this new error came up....and its yet another of these unresolved external symbol errors.
Is there a way of finding out what they mean and how to fix it.....have had a few of these errors and all seem to have a different solution...
PLEASE HELP!!! again...

coursework error LNK2019: unresolved external symbol "public: void __thiscall shape_utils::draw_all<class std::vector<class Shape *,class std::allocator<class Shape *> > >(class std::vector<class Shape *,class std::allocator<class Shape *> > const &)" (??$draw_all@V?$vector@PAVShape@@V?$allocator@PAVShape@@@std@@@std@@@shape_utils@@QAEXABV?$vector@PAVShape@@V?$allocator@PAVShape@@@std@@@std@@@Z) referenced in function _main

The shape_utils is one of my own classes and it's part of my project and I've already set precompiled headers to off.
Have also checked that the method signature is exactly the same in the header and cpp file.
It's also a template method...  

Hope this info helps...
0
benoost123
Asked:
benoost123
  • 2
  • 2
1 Solution
 
jkrCommented:
What's the declaration and where does the implementation reside? It should be in the same file as the implementation.
0
 
benoost123Author Commented:
template <typename Container>
void draw_all(const Container& con);

it's declared in shape_utils.h and the implementation is in shape_utils.cpp
0
 
jkrCommented:
Move the implementation to the header file. VC++ does not support separating them into a .cpp file.
0
 
benoost123Author Commented:
Have done it...... IT WORKS!   (or at least it compiles for now.... :-) )
Thanks very much jkr!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now