"nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12..."错误!
2008-10-21 19:45
495 查看
朋友编写一个dll,编译时总出现"nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12..."错误!后发现是,其创建dll时选择的时不使用MFC,而后来工程中又添加了与MFC相关的东西.才引起上述问题.采用如下步骤解决此问题:1.将工程设置中改为"动态使用MFC"2.到C++设置页中,看到Preprocessor Definitions编辑框中同时存在_USRDLL和_AFXDLL, 删除_USRDLL即可.
相关文章推荐
- VC编译错误: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12已经在dllmain.obj 中定义
- VC++编译错误: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12已经在dllmain.obj 中定义
- VC编译错误: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12已经在dllmain.obj 中定义
- VC: Nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 已经在dllmain.obj 中定义
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- VC编译错误:msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class typ
- uafxcwd.lib(dllmodul.obj) : error LNK2005: DllMain 已经在 中定义
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPA
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj) 中定义
- mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
- VC编译错误:msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class typ
- VS2005(VC6)出现如下链接错误的解决方法uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsign
- VS2008(VC6)出现如下链接错误的解决方法uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsign
- uafxcwd.lib(dllmodul.obj) : error LNK2005: DllMain 已经在 中定义
- mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
- nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12
- uafxcwd.lib(dllmodul.obj) : error LNK2005: DllMain 已经在 中定义
- VC编译错误:uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj
- uafxcwd.lib(dllmodul.obj) : error LNK2005: DllMain 已经在 中定义
- mfcs100d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)