thready
asked on
linker errors
Hi Experts,
I'm converting an MFC project written in VS2008 to VS2010 - I'm getting loads of linker errors:
3>cppunitd.lib(TextTestRun ner.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std @@QAEHH@Z) referenced in function "class std::basic_ostream<char,st ruct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,st ruct std::char_traits<char> > &,charconst *)" (??$?6U?$char_traits@D@std @@@std@@YA AAV?$basic _ostream@D U?$char_tr aits@D@std @@@0@AAV10 @PBD@Z)
3>cppunitd.lib(CompilerOut putter.obj ) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std @@QAEHH@Z)
3>cppunitd.lib(TextOutputt er.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std @@QAEHH@Z)
3>cppunitd.lib(TextTestPro gressListe ner.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(int)" (__imp_?width@ios_base@std @@QAEHH@Z)
3>cppunitd.lib(TextTestRun ner.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEHP BDH@Z) referenced in function "class std::basic_ostream<char,st ruct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,st ruct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std @@@std@@YA AAV?$basic _ostream@D U?$char_tr aits@D@std @@@0@AAV10 @PBD@Z)
3>cppunitd.lib(CompilerOut putter.obj ) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEHP BDH@Z)
3>cppunitd.lib(TextOutputt er.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEHP BDH@Z)
3>cppunitd.lib(TextTestPro gressListe ner.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEHP BDH@Z)
3>cppunitd.lib(TextTestRun ner.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(void) const " (__imp_?width@ios_base@std @@QBEHXZ) referenced in function "class std::basic_ostream<char,st ruct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,st ruct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std @@@std@@YA AAV?$basic _ostream@D U?$char_tr aits@D@std @@@0@AAV10 @PBD@Z)
3>cppunitd.lib(CompilerOut putter.obj ) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(void) const " (__imp_?width@ios_base@std @@QBEHXZ)
3>cppunitd.lib(TextOutputt er.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(void) const " (__imp_?width@ios_base@std @@QBEHXZ)
3>cppunitd.lib(TextTestPro gressListe ner.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::ios_base::width(void) const " (__imp_?width@ios_base@std @@QBEHXZ)
3>cppunitd.lib(TextTestRun ner.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEXX Z) referenced in function "public: __thiscall std::basic_ostream<char,st ruct std::char_traits<char> >::_Sentry_base::_Sentry_b ase(class std::basic_ostream<char,st ruct std::char_traits<char> > &)" (??0_Sentry_base@?$basic_o stream@DU? $char_trai ts@D@std@@ @std@@QAE@ AAV12@@Z)
3>cppunitd.lib(CompilerOut putter.obj ) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::basic_streambuf<char, struct std::char_traits<char> >::_Lock(void)" (__imp_?_Lock@?$basic_stre ambuf@DU?$ char_trait s@D@std@@@ std@@QAEXX Z)
They are all problems with linking to the std library... Not sure why they are not being found...
I'm converting an MFC project written in VS2008 to VS2010 - I'm getting loads of linker errors:
3>cppunitd.lib(TextTestRun
3>cppunitd.lib(CompilerOut
3>cppunitd.lib(TextOutputt
3>cppunitd.lib(TextTestPro
3>cppunitd.lib(TextTestRun
3>cppunitd.lib(CompilerOut
3>cppunitd.lib(TextOutputt
3>cppunitd.lib(TextTestPro
3>cppunitd.lib(TextTestRun
3>cppunitd.lib(CompilerOut
3>cppunitd.lib(TextOutputt
3>cppunitd.lib(TextTestPro
3>cppunitd.lib(TextTestRun
3>cppunitd.lib(CompilerOut
They are all problems with linking to the std library... Not sure why they are not being found...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But those are not my projects - not even sure where they come from or what they're for...
ASKER
Aha! It was my test project - it uses unit testing... Builds when I unload the test project......
Cool. Nice shirt, by the way. I like the color.
ASKER
lmao
If you look at the times on the threads it is clear that http:a#34158397 gave the asker the information which lead to the solution. It pointed out the source of the errors and was therefore part of the solution.
That one and http:a#34158436 (the asker's post) provide the complete solution to this post.
That one and http:a#34158436 (the asker's post) provide the complete solution to this post.
ASKER
Apologies for not giving points sooner.
ASKER
But it's compiling fine - it's just the linker.... It can't be a #include or a using clause if it's at the link stage right?