Moving Project From VS 2003 to VS 2005

A

Adam Hartshorne

I have just upgraded to Visual Studio 2005 and have loaded in a project
i have been working on, and the code compiles ok but fails to link
correctly, as shown below. Any suggestions about what is wrong would be
much appreciated,

1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,char const *)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(char const *,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<char,struct std::char_traits<char>,class
std::allocator<char> >(class std::basic_ostream<char,struct
std::char_traits<char> > &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<struct std::char_traits<char> >(class
std::basic_ostream<char,struct std::char_traits<char> > &,char const *)"
(??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
already defined in main.obj
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<struct std::char_traits<char> >(class
std::basic_ostream<char,struct std::char_traits<char> > &,unsigned
char)"
(??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z)
already defined in rmfSystem.obj
1>LINK : warning LNK4199: /DELAYLOAD:comdlg32.dll ignored; no imports
found from comdlg32.dll
1>LINK : warning LNK4199: /DELAYLOAD:eek:leaut32.dll ignored; no imports
found from oleaut32.dll
1>LINK : warning LNK4199: /DELAYLOAD:winmm.dll ignored; no imports found
from winmm.dll
1>LINK : warning LNK4199: /DELAYLOAD:wsock32.dll ignored; no imports
found from wsock32.dll
1>LINK : warning LNK4199: /DELAYLOAD:winspool.dll ignored; no imports
found from winspool.dll
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)"
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
referenced in function "public: virtual bool __thiscall
OpenMesh::IO::BaseReader::can_u_read(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?can_u_read@BaseReader@IO@OpenMesh@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>OpenMeshCore.lib(BaseWriter.obj) : error LNK2001: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)"
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)"
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
referenced in function "public: virtual bool __thiscall
OpenMesh::IO::BaseReader::can_u_read(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?can_u_read@BaseReader@IO@OpenMesh@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>OpenMeshCore.lib(BaseWriter.obj) : error LNK2001: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)"
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::const_iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)const "
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ)
referenced in function "protected: bool __thiscall
OpenMesh::IO::BaseReader::check_extension(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?check_extension@BaseReader@IO@OpenMesh@@IBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::const_iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)const "
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ)
referenced in function "protected: bool __thiscall
OpenMesh::IO::BaseReader::check_extension(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?check_extension@BaseReader@IO@OpenMesh@@IBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>Release/multiSelect.exe : fatal error LNK1120: 4 unresolved externals



Adam
 
T

TB

Adam Hartshorne sade:
I have just upgraded to Visual Studio 2005 and have loaded in a project
i have been working on, and the code compiles ok but fails to link
correctly, as shown below. Any suggestions about what is wrong would be
much appreciated,

Seems to be a linking problem ;)

TB
 
M

mlimber

Adam said:
I have just upgraded to Visual Studio 2005 and have loaded in a project
i have been working on, and the code compiles ok but fails to link
correctly, as shown below. Any suggestions about what is wrong would be
much appreciated,

1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,char const *)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __cdecl std::eek:perator+<char,struct
std::char_traits<char>,class std::allocator<char> >(char const *,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<char,struct std::char_traits<char>,class
std::allocator<char> >(class std::basic_ostream<char,struct
std::char_traits<char> > &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z)
already defined in OpenMeshCore.lib(omstream.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<struct std::char_traits<char> >(class
std::basic_ostream<char,struct std::char_traits<char> > &,char const *)"
(??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
already defined in main.obj
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::eek:perator<<<struct std::char_traits<char> >(class
std::basic_ostream<char,struct std::char_traits<char> > &,unsigned
char)"
(??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z)
already defined in rmfSystem.obj
1>LINK : warning LNK4199: /DELAYLOAD:comdlg32.dll ignored; no imports
found from comdlg32.dll
1>LINK : warning LNK4199: /DELAYLOAD:eek:leaut32.dll ignored; no imports
found from oleaut32.dll
1>LINK : warning LNK4199: /DELAYLOAD:winmm.dll ignored; no imports found
from winmm.dll
1>LINK : warning LNK4199: /DELAYLOAD:wsock32.dll ignored; no imports
found from wsock32.dll
1>LINK : warning LNK4199: /DELAYLOAD:winspool.dll ignored; no imports
found from winspool.dll
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)"
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
referenced in function "public: virtual bool __thiscall
OpenMesh::IO::BaseReader::can_u_read(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?can_u_read@BaseReader@IO@OpenMesh@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>OpenMeshCore.lib(BaseWriter.obj) : error LNK2001: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)"
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)"
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
referenced in function "public: virtual bool __thiscall
OpenMesh::IO::BaseReader::can_u_read(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?can_u_read@BaseReader@IO@OpenMesh@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>OpenMeshCore.lib(BaseWriter.obj) : error LNK2001: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)"
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AViterator@12@XZ)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::const_iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::begin(void)const "
(__imp_?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ)
referenced in function "protected: bool __thiscall
OpenMesh::IO::BaseReader::check_extension(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?check_extension@BaseReader@IO@OpenMesh@@IBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>OpenMeshCore.lib(BaseReader.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::const_iterator __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::end(void)const "
(__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AVconst_iterator@12@XZ)
referenced in function "protected: bool __thiscall
OpenMesh::IO::BaseReader::check_extension(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?check_extension@BaseReader@IO@OpenMesh@@IBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>Release/multiSelect.exe : fatal error LNK1120: 4 unresolved externals



Adam

It looks like your C++ standard library must not be included in your
link. Check your project settings. For more specific help, try a
Microsoft newsgroup; see this FAQ for some suggestions:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top