FireBreath添加MFC资源后编译失败
一度凡尘 2015-04-03 11:46:20 首先,我按照firebreath项目的创建流程创建一个有窗体的插件(注:可以实现划线功能,说明没问题),然后我想在这个项目中使用MFC对话框资源,添加关联的类,然后编译就会提示如下错误:
>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMTD.lib(new.obj) 中定义
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) 已经在 LIBCMTD.lib(dbgdel.obj) 中定义
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) 已经在 libcpmtd.lib(newaop.obj) 中定义
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) 已经在 LIBCMTD.lib(delete2.obj) 中定义
1>FireBreathWin.def : warning LNK4022: 找不到符号“DllCanUnloadNow”的唯一匹配项
1>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllCanUnloadNow(void)" (?DllCanUnloadNow@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJXZ) 在 PluginAuto\Debug\OFF_PluginAuto.lib 中定义
1>FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 在 PluginAuto\Debug\OFF_PluginAuto.lib 中定义
1>FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 在 C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/atlmfc/lib\uafxcwd.lib 中定义
1>FireBreathWin.def : warning LNK4022: 找不到符号“DllGetClassObject”的唯一匹配项
1>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllGetClassObject(struct _GUID const &,struct _GUID const &,void * *)" (?DllGetClassObject@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJABU_GUID@@0PAPAX@Z) 在 PluginAuto\Debug\OFF_PluginAuto.lib 中定义
1>FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 在 PluginAuto\Debug\OFF_PluginAuto.lib 中定义
1>FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 在 C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/atlmfc/lib\uafxcwd.lib 中定义
1>FireBreathWin.def : error LNK2001: 无法解析的外部符号 DllCanUnloadNow
1>FireBreathWin.def : error LNK2001: 无法解析的外部符号 DllGetClassObject
1>F:\FireBreath\build\projects\UWebOffice\Debug\XXX.lib : fatal error LNK1120: 2 个无法解析的外部命令
1>UWebOffice - 7 个错误,8 个警告
请问有人遇到过这样的问题吗?网上搜出来的都没有解决