CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    1

    Linker error in VS2010 project

    Hi,

    We are migrating from VC6.0 workspace to VS2010 solution. We have lot of our own dll's and lib's. we were able to build one of our template library. But when we try to use that library in another project we are getting below linker errors. Note that we are not seeing this when we built this with VC6.0 IDE

    >msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >:perator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) already defined in otoken.lib(otoken.obj)
    2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in otoken.lib(otoken.obj)
    2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@QAE_J_J@Z) already defined in otoken.lib(otoken.obj)
    2>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z) already defined in otoken.lib(otoken.obj)

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Linker error in VS2010 project

    It looks like some of your modules were build using different CRT libraries or something described in this MSDN article
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured