< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Can't linked to RutilD.lib, maybe a bug.


I checked out the newest resiprocate(main) and compile it(SSL_DEBUG and SSL_RELEASE) by VS2008(VC9), all projects "c/c++->code generation->runtime library" are set as /MTd and /MT; Once I try link all resip libraries to a VC9 MFC application, always got a link error:

1>RutilD.lib(Log.obj) : error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" (??3@YAXPAXHPBDH@Z) already defined in uafxcwd.lib(afxmem.obj)

The MFC application is "Dialog base" which generated by wizard, the "c/c++->code generation->runtime library" are set as /MTd and /MT; And set use of MFC as "Use MFC in a Static Library", I havent' wrote any other code in the MFC application, just add below:

#include <rutil/Coders.hxx>
#include <rutil/Random.hxx>
#include <rutil/MD5Stream.hxx>
#include <resip/stack/XMLCursor.hxx>
#include <rutil/ParseBuffer.hxx>

using namespace resip;

#ifdef _DEBUG
#pragma comment(lib, "../lib/resip/RutilD.lib")
#else
#pragma comment(lib, "../lib/resip/Rutil.lib")
#endif


Note: If compile the MFC app in Release mode, succeeded, the link error just appears with DEBUG mode.

Thanks