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

本文介绍了解决VS2010 C++ Express版本中ATL库缺失导致的链接问题及警告信息的方法。通过安装Windows SDK 7.1并调整项目的包含目录和链接库设置,可以有效解决ATL相关问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


场景:

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/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

白行微

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值