nafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined
如果开始用了一个ATL的Dll工程,然后为了在这个dll工程里面使用MFC,
在里面加入MFC支持
在stdafx.h的atlbase.h前面加入
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation extensions
那么就会出现错误,例如
nafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in LyricPlayerdll.obj
nafxcw.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in LyricPlayerdll.obj; second definition ignored
???? Creating library Release/IWOBZ_Lyric_Plugin.lib and object Release/IWOBZ_Lyric_Plugin.exp
Release/IWOBZ_Lyric_Plugin.dll : fatal error LNK1169: one or more multiply defined symbols found
解决办法:
工程->设置->C/C++->
Category:Preprocessor
Preprocessor definitions:
WIN32,NDEBUG,_WINDOWS,_MBCS,_USRDLL,MSGBOX_EXPORTS,_WINDLL,_AFXDLL中的_USRDLL,删除,就可以正确编译了
nafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined相关推荐
- nafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined问题解决
如果开始用了一个ATL的Dll工程,然后为了在这个dll工程里面使用MFC, 在里面加入MFC支持 在stdafx.h的atlbase.h前面加入 #include <afxwin.h> ...
- uafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in main.obj
如果出现这种错误:"uafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in main.obj &q ...
- mfcs100ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 已经在 dllmain.obj 中定义
今天写一个动态链接库,需要引用一个外部的动态链接库,编译时提示"mfcs100ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 已经在 dl ...
- VS2010编译静态链接MFC的OCX遇到的问题:nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 已经在 LIBCMTD.lib(dllm
打开工程属性页,配置属性->链接器->输入,忽略特定默认库添加 LIBCMTD.lib;nafxcwd.lib 附加依赖项添加 nafxcwd.lib;LIBCMTD.lib 目的是调整依 ...
- error LNK2005: _DllMain@12 already defined in MSVC
error LNK2005: _DllMain@12 already defined in MSVC 方案一. 编程中经常能遇到LNK2005错误--重复定义错误,其实LNK2005错误并不是一个很难 ...
- error LNK2005: _DllMain@12 already defined的解决办法
用Visual C++编写DLL,如果在new project时选了MFC DLL,而后又想写成Regular DLL,即拥有自己的DllMain()入口函数,则在build时会遇到类似如下的link ...
- error LNK2005: _DllMain@12 already defined in MSVC 2009-10-29 17:49
error LNK2005: _DllMain@12 already defined in MSVC 方案一. 编程中经常能遇到LNK2005错误--重复定义错误,其实LNK2005错误并不是一个很难 ...
- error LNK2005: _DllMain@12 already defined in xxx 的应对
error LNK2005: _DllMain@12 already defined in MSVC 方案一. 编程中经常能遇到LNK2005错误--重复定义错误,其实LNK2005错误并不是一个很难 ...
- error LNK2005: _DllMain@12 已经在 MSVCRTD.lib(dllmain.obj) 中定义
本文主要分析和解决编译链接时产生的 LNK2005 错误. [错误信息]: mfcs90ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 alread ...
最新文章
- python特性(八):生成器对象的send方法
- 为什么有的人还不到三十岁,就对工作失去了兴趣呢?
- 记录一次postfix无法收取邮件和mysql异常不能启动
- lepus监控oracle数据库_一文看懂lepus天兔数据库监控系统如何搭建
- vue中子组件向父组件传递数据(实现加减的实例)
- 【数据大神必看】微信又添新功能!这个微信群可以学英语,而且全程免费
- guice android,android – 如何使用Guice的@Singleton?
- 微信html5 video自动播放,【微信H5开发】audio/video标签的自动播放
- greedy算法计算金字塔分数问题
- 二进制转bcd码c语言程序,二进制转8421BCD码的算法
- 计算机网络波动大,电脑网络总是不稳定的解决方法
- RAKsmart高防服务器防御形式解析
- Python使用pip安装报错ModuleNotFoundError: No module named ‘pip._internal.cli.main‘的解决方法
- 【SVAC2.0】国家安防监控SVAC2.0标准支持特性
- 考研数学 第5讲一元微分几何应用
- 生物信息-学习从NCBI上下载数据
- 使用Oracle sql_trace 工具
- 获取网页访问者的IP地址
- 图像处理 - GLCM灰度共生矩阵如何计算
- Excel插入图片自动OCR识别成可编辑的文字
热门文章
- Linux如何制作efi启动盘,教你制作macOS+Ubuntu+WindowsPE超级启动盘(仅支持UEFI)
- 第五次作业:项目分类
- win10浏览器闪退_Win10系统下Edge浏览器经常闪退的解决方法
- Latex公式与Word公式相互转换(使用MathType)
- html5 sandbox,”基情“无限的IE10和HTML5
- MySql下载及安装部署
- 【workqueue】flush_work函数解析
- XUPT_STA2018(部分题解)
- linux iconv_open 多线程 安全,雨林木风弃Windows推Linux开源操作系统
- 【WIN7深度揭秘】将你的笔记本打造成WI-FI基站实现无线共享上网