当前位置: 代码迷 >> 多媒体/流媒体开发 >> 使用jrtplib出现了一堆链接异常
  详细解决方案

使用jrtplib出现了一堆链接异常

热度:9071   发布时间:2013-02-26 00:00:00.0
使用jrtplib出现了一堆链接错误
我包含了jrtplib的头文件,然后定义了一个RTPSession类,之后出现了链接错误:

Linking...
msvcprtd.lib(MSVCP60D.dll)   :   error   LNK2005:   "public:   char   const   *   __thiscall   std::basic_string <char,struct   std::char_traits <char> ,class   std::allocator <char>   > ::c_str(void)const   "   (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q
BEPBDXZ)   already   defined   in   libcpmtd.lib(ios.obj)
msvcprtd.lib(MSVCP60D.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>   > (void) "   (??1?$basic_strin
g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   already   defined   in   VideoWin.obj
msvcprtd.lib(MSVCP60D.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>   > (char   const   *,class   std::a
llocator <char>   const   &) "   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z)   already   defined   in   libcpmtd.lib(ios.obj)
msvcprtd.lib(MSVCP60D.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 <c
har,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   libcpmtd.lib(ios.obj)
MSVCRTD.lib(MSVCRTD.dll)   :   error   LNK2005:   _strncpy   already   defined   in   libcmtd.lib(strncpy.obj)
MSVCRTD.lib(MSVCRTD.dll)   :   error   LNK2005:   __snprintf   already   defined   in   libcmtd.lib(snprintf.obj)
MSVCRTD.lib(MSVCRTD.dll)   :   error   LNK2005:   _time   already   defined   in   libcmtd.lib(time.obj)
LINK   :   warning   LNK4098:   defaultlib   "MSVCRTD "   conflicts   with   use   of   other   libs;   use   /NODEFAULTLIB:library
Debug/VidioServer.exe   :   fatal   error   LNK1169:   one   or   more   multiply   defined   symbols   found
Error   executing   link.exe.

我必须以use   mfc   in   static   dll的方式编译。应该怎样解决呢?

------解决方案--------------------------------------------------------
如果在Windows下使用VC6.0编译JRTPLib需要SP6,因为其中用到了SP6提供的新的库,也可能还有其它的库,否则编译就会出一大堆的错误