We help IT Professionals succeed at work.

Yet another unresolved external symbol error.

benoost123
benoost123 asked
on
Medium Priority
228 Views
Last Modified: 2010-04-01
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...
Comment
Watch Question

jkr
CERTIFIED EXPERT
Top Expert 2012

Commented:
What's the declaration and where does the implementation reside? It should be in the same file as the implementation.

Author

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
CERTIFIED EXPERT
Top Expert 2012
Commented:
Move the implementation to the header file. VC++ does not support separating them into a .cpp file.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Have done it...... IT WORKS!   (or at least it compiles for now.... :-) )
Thanks very much jkr!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.