[VS2010]_[初级]_[VC++ Express 使用WDK的ATL编译出现的问题解决办法]

来源:互联网 发布:js和jsp的区别和联系 编辑:程序博客网 时间:2024/06/03 00:35


场景:

1. 最近切换到vs2010 c++ express, 没办法我这里的专业版最近一启动软件基本就处于卡死的状态,要么就是Debug时卡死的状态,找了很久没解决办法.

2. VS2010专业版是自带ATL库的,但是 express却没带,可以看出微软的小家子气.顺便提下express连Debug时反汇编的功能都去掉了,很恶心,

还有Kernel32.lib这些库的链接文件也不提供,微软这是让我们只能用标准库? 下载Windows SDK 7.1 会自带Kernal32.lib的链接文件,暂时能解决问题.

3. Express连插件都不让装,所以用Express 版本少了很多提升效率的功能,估计也就过度一下.


问题: 链接ATL时出现以下警告,看起来很严重, 不过我这里也参考了作者的说法, 先不理这个提示,看下软件用的情况再说.

1>atlsd.lib(atlcommodule.obj) : warning LNK4078: multiple 'ATL' sections found with different attributes (40301040)

解决办法:

Instructions are very simple: Add to include directories for VC++ Express directories for WTL and ATL included in WDK 7.1.0, and also libraries from WDK. I think this is legal.Warnings are because ATL files from WDK are older that VS2010 files, and define ATL sections differently. In atlbase.h:pragma section("ATL$__a", read, shared)pragma section("ATL$__z", read, shared)pragma section("ATL$__m", read, shared)If you change that to:pragma section("ATL$__a", read)pragma section("ATL$__z", read)pragma section("ATL$__m", read)everything will be OK.If you don't want to modify atlbase.h, you can ignore these warning, I don't think they can cause any real problem. You can also suppress them by adding /ignore:4254 to the linker command line.Unfortunately, WTL cannot do anything to fix this.

参考网址:

http://sourceforge.net/p/wtl/support-requests/2/


0 0
原创粉丝点击