May 8, 2012 at 3:22pm UTC
I am converting a project from Visual Studio 6 to VS 2010, and I get the following link error:
error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class CVector<class C1dArray_of_numbers<float> > 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 std::char_traits<char> > &)" (?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 new to this forum and don't know how that works.
Any help would be greatly appreciated.
Thank you.
Scott
May 8, 2012 at 5:34pm UTC
You have an overloaded operator<< taking a std::ostream and a const CVector& whose definition is not being found by the linker (which suggests the definition is not in a file that was included in your project.)