msvcprt.lib (msvcp60.dll) LNK2005 error

A

Angus

I have this link error:

msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<cha
r,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@
Z) already defined in libcpd.lib(ios.obj)

Not sure how to resolve?

Angus
 
M

Mike Wahler

Angus said:
I have this link error:

msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<cha
r,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@
Z) already defined in libcpd.lib(ios.obj)

Not sure how to resolve?

Fix the bug on line 42.

-Mike
 
J

Jim Langston

Angus said:
I have this link error:

msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<cha
r,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@
Z) already defined in libcpd.lib(ios.obj)

Not sure how to resolve?

Angus

This is a link error, basically saying that you are trying to link the same
function twice. When I get these errors I generally google for the library
and function name and I find something saying, if you get this error, remove
from the link xxxxx.lib.

Now, looking at your particular error, it says that there is some function
in msvcprt.lib that is also in libcpd.lib. Google to find out how to fix
the conflict (most likely you don't want to include one of those libraries).

This is OT because it is a link problem, you should ask in a microsoft
newsgroup such as:
microsoft.public.vc.language or
comp.os.ms-windows.programmer.win32
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top