编译Debug版本的Opal时,出现函数重复定义链接错误,无法生成Opald.dll 解决办法
Posted on 2006-12-01 16:09 sunrack 阅读(1296) 评论(2) 收藏 举报
在Visual Studio 2003 下面编译Debug版本的Opal,以便生成Opald.dll文件。
生成时出现以下链接错误:
------ 已启动生成: 项目: OPAL_dll, 配置: Debug Win32 ------
![]()
正在链接![]()
正在创建库 .\..\..\lib/opald.lib 和对象 .\..\..\lib/opald.exp
opalsd.lib(manager.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(endpoint.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(sipep.obj) : error LNK2005: "public: static char const * __cdecl
PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transaddr.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transaddr.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(h323trans.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(h323trans.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PSocket::SelectList::Class(void)"
(?Class@SelectList@PSocket@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PSocket>::Class(void)"
(?Class@?$PList@VPSocket@@@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "protected: __thiscall
PList<class PSocket>::PList<class PSocket>(int,class PList<class PSocket>
const *)" (??0?$PList@VPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "protected: __thiscall
POrdinalDictionary<class PString>::POrdinalDictionary<class
PString>(int,class POrdinalDictionary<class PString> const *)"
(??0?$POrdinalDictionary@VPString@@@@IAE@HPBV0@@Z) 已经在 ptlibd.lib(ptlibd.
dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "public: static char const *
__cdecl POrdinalDictionary<class PString>::Class(void)"
(?Class@?$POrdinalDictionary@VPString@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(peclient.obj) : error LNK2005: "public: static char const *
__cdecl POrdinalKey::Class(void)" (?Class@POrdinalKey@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(peclient.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(frame.obj) : error LNK2005: "public: static char const * __cdecl
PTimer::Class(void)" (?Class@PTimer@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll)
中定义
opalsd.lib(call.obj) : error LNK2005: "public: static char const * __cdecl
PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(guid.obj) : error LNK2005: "public: static char const * __cdecl
PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(guid.obj) : error LNK2005: "protected: __thiscall PList<class
PIPSocket::InterfaceEntry>::PList<class PIPSocket::InterfaceEntry>(int,class
PList<class PIPSocket::InterfaceEntry> const *)"
(??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
..\..\lib\opald.dll : fatal error LNK1169: 找到一个或多个多重定义的符号
![]()
生成日志保存在“file://d:\Voip\openh323\opal\lib\Debug\BuildLog.htm”中
OPAL_dll - 22 错误,0 警告
如果不能生成Debug版本,将无法进行调试工作。
经过反复测试,已经找到解决办法:
修改\opal\lib\Debug\opald.def文件,把重复定义全部删除即可。
版本号:
opal-v2_2_3-src.zip
pwlib-v1_10_2-src.zip
生成时出现以下链接错误:
------ 已启动生成: 项目: OPAL_dll, 配置: Debug Win32 ------
正在链接
正在创建库 .\..\..\lib/opald.lib 和对象 .\..\..\lib/opald.exp
opalsd.lib(manager.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(endpoint.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(sipep.obj) : error LNK2005: "public: static char const * __cdecl
PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transaddr.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transaddr.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(h323trans.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(h323trans.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PSocket::SelectList::Class(void)"
(?Class@SelectList@PSocket@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PSocket>::Class(void)"
(?Class@?$PList@VPSocket@@@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "protected: __thiscall
PList<class PSocket>::PList<class PSocket>(int,class PList<class PSocket>
const *)" (??0?$PList@VPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "public: static char const *
__cdecl PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(transports.obj) : error LNK2005: "protected: __thiscall
PList<class PIPSocket::InterfaceEntry>::PList<class
PIPSocket::InterfaceEntry>(int,class PList<class PIPSocket::InterfaceEntry>
const *)" (??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "protected: __thiscall
POrdinalDictionary<class PString>::POrdinalDictionary<class
PString>(int,class POrdinalDictionary<class PString> const *)"
(??0?$POrdinalDictionary@VPString@@@@IAE@HPBV0@@Z) 已经在 ptlibd.lib(ptlibd.
dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "public: static char const *
__cdecl POrdinalDictionary<class PString>::Class(void)"
(?Class@?$POrdinalDictionary@VPString@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(gkserver.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(peclient.obj) : error LNK2005: "public: static char const *
__cdecl POrdinalKey::Class(void)" (?Class@POrdinalKey@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(peclient.obj) : error LNK2005: "public: static char const *
__cdecl PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经
在 ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(frame.obj) : error LNK2005: "public: static char const * __cdecl
PTimer::Class(void)" (?Class@PTimer@@SAPBDXZ) 已经在 ptlibd.lib(ptlibd.dll)
中定义
opalsd.lib(call.obj) : error LNK2005: "public: static char const * __cdecl
PSafeCollection::Class(void)" (?Class@PSafeCollection@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(guid.obj) : error LNK2005: "public: static char const * __cdecl
PList<class PIPSocket::InterfaceEntry>::Class(void)"
(?Class@?$PList@VInterfaceEntry@PIPSocket@@@@SAPBDXZ) 已经在
ptlibd.lib(ptlibd.dll) 中定义
opalsd.lib(guid.obj) : error LNK2005: "protected: __thiscall PList<class
PIPSocket::InterfaceEntry>::PList<class PIPSocket::InterfaceEntry>(int,class
PList<class PIPSocket::InterfaceEntry> const *)"
(??0?$PList@VInterfaceEntry@PIPSocket@@@@IAE@HPBV0@@Z) 已经在
ptlibd.lib(ptlibd.dll) 中定义
..\..\lib\opald.dll : fatal error LNK1169: 找到一个或多个多重定义的符号
生成日志保存在“file://d:\Voip\openh323\opal\lib\Debug\BuildLog.htm”中
OPAL_dll - 22 错误,0 警告
如果不能生成Debug版本,将无法进行调试工作。
经过反复测试,已经找到解决办法:
修改\opal\lib\Debug\opald.def文件,把重复定义全部删除即可。
版本号:
opal-v2_2_3-src.zip
pwlib-v1_10_2-src.zip
浙公网安备 33010602011771号