VS2010 Build MFC always links gdiplus.dll
来源:互联网 发布:英灵召唤师 知乎 编辑:程序博客网 时间:2024/05/17 22:32
在使用VS2010编译MFC程序的时候(以静态MFC的方式包含),发现程序会自动将gdiplus.dll链接到生成的exe文件中,即使你没有使用gdiplus中的任何函数。
使用VS2008编译同样的程序,也会有gdiplus.dll链接到exe文件中,分析一下程序,是因为CDialogEx这个对话框的基类引起的,原因是CDialogEx中引入了一些对窗口进行特殊处理的方法,可能使用了gdiplus中的函数。将CDialogEx改为CDialog后,在VS2008下编译程序,查看exe就没有gdiplus.dll的链接了。
以同样的方法对VS2010中的MFC程序进行修改,结果仍然包含gdiplus.dll的链接。
下面是Windows C++组对这个问题的回复:
由 Microsoft 在 2010/7/23 13:31 发送
Hello,
Thanks for the report. This is by design. MFC uses the ATL CImage class internally, which depends on GDIPlus to be able to draw PNG images.
Pat Brenner
Visual C++ Libraries Development
最终的原因是因为MFC中的类CImage使用了GDIPlus的相关方法(主要是用于PNG图片的绘制)导致的。
由 Microsoft 在 2010/8/4 11:55 发送
Hi,
You didn't see gdiplus.dll in your application when you use dynamic mfc because mfc100*.dll but not your application depends on gdiplus.dll. If open expand mfc100*.dll, you can see gdiplus.dll there.
When you static link to mfc, then mfc is part of your application, so you will see gdiplus.dll under your application.
Thanks,
Windows C++ Team
所以使用动态MFC链接方式编译的话就不会有gdiplus.dll的链接,是因为mfc100*.dll包含了gdiplus.dll的链接,原因就是出在MFC的底层类库。
最后,Microsoft的答复是他们正在处理。希望能在下一次的补丁中看到相关修改吧!
HITZZL
2010年12月30日
- VS2010 Build MFC always links gdiplus.dll
- build workspace always
- 调用gdiplus.dll 异常 (无法加载 DLL (gdiplus.dll))
- VS2010 在共享 DLL 中使用 MFC
- Links about "Daily Build"
- android build system links
- Mono System.DllNotFoundException: gdiplus.dll
- 解决windows xp中不能使用gdiplus.dll 1.1的问题(vs2010中如何添加manifest文件)
- flowerboard游戏MFC+GDIPLUS实现
- 无法加载DLL "gdiplus.dll":拒绝访问
- [GDI+] GdiPlus在dll中的初始化位置
- GDIPLUS
- MFC之基于Gdiplus的图像类
- Opencv Mat转MFC Gdiplus::Bitmap
- unable to load dll 'gdiplus.dll' in docker
- Never-build package 'a' requires always-build package 'b'
- Never-build package 'XXXX' requires always-build package 'EhLib70'
- Never-build package %s requires always-build package %s
- 关于sql的查询语句
- Linux的Shell编程
- Android:layout_weight的用法
- h.264视频文件封装
- 由“标准C”“纯C”引发的思考
- VS2010 Build MFC always links gdiplus.dll
- 开始ACM
- C++ 前置声明的问题
- jquery 实现。同列中的数据相同的话合并
- 2010结束了
- android animation
- notes of "The C++ Programming language"
- GridView的RowDataBound事件可做的一些事情
- Understand the serialVersionUID