Thursday, August 16, 2012

... already defined in ...lib

when you build visual c project, if you get some error message like Error 4 error LNK2005: "bool __cdecl std::operator==,class std::allocator >(class std::basic_string,class std::allocator > const &,char const *)" (??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z) already defined in websocketpp.lib(uri.obj) msvcprt.lib (this error I get when try to compile examples of websocketpp) just change Runtime Library in project's properties to Multithreaded (/MT) or Multi-threaded Debug (/MD)

1 comment:

  1. After convert from vs2008 to vs2010 I have some troubles with that compiler.
    more tips:
    - ignore these libraries:
    libc.lib;msvcrt.lib;msvcprt.lib;libcd.lib;libcmtd.lib;msvcrtd.lib;
    - Rebuild all your static lib with /MT (same as your main project)

    ReplyDelete