Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am converting a project from Visual Studio 6 to VS 2010, and the overloaded function: os << m_pos;

gives the following link error:

error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct> > & __cdecl operator<<(class std::basic_ostream<char,struct> > &,class CVector<class> > const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$CVector@V?$C1dArray_of_numbers@M@@@@@Z) referenced in function "public: int __thiscall CRestart_file_header::Write(class std::basic_ostream<char,struct> > &)" (?Write@CRestart_file_header@@QAEHAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)

I am guessing I am missing some library. Any ideas?

I have a small project that shows the code that I could upload, but I am how to do that.

Any help would be greatly appreciated.

Thank you.

Scott
Posted

(first thought)
Did you replace the STL header files from the old ways (with .h extension) to the new ways (no .h extension) ?

for example
#include <vector.h>
to
#include <vector>

Check all your STL include files.
----

Question:
What are "os" and "m_pos" ?
 
Share this answer
 
Comments
Maximilien 8-May-12 13:57pm    
@enhzflep, edited how ? what ?
There were two friend declarations of both functions that were causing the link errors.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900