VS2008下编译错误(error C2065: '_S1max' : undeclared identifier)的解决办法

15 篇文章 0 订阅

最近用VS2008+WDK调试程序,但是即使我新建的一个工程也调试不成功,想当的纠结,查了N久终于找到一篇靠谱的,然后才调试通过,先把原文贴上:


After deep investigation, i solved my problem. The problem is after Windows Driver Kit (WDK) 7.1.0 installation , i have to add the path for includes to my project ( Tools --> Options ---> Projects and solutions --> VC++ Directories --->Include files)

The problem( errors posted ) happens when i run the project. Reason is , WDKinstallation places several include files ( example: atlalloc.h ,atlconv.h ) , these include files also there in VC includes of Visual studio 2008.

As far as i understood, compiler gives first priority to VC includes of Visual studio 2008 .

When we added path for WDK includes , the new paths are added before the default includes path. So, compiler faces ambiguity .

I reordered the path of include files ( set the new include file paths after default include files path)

Problem is solved.

However, i encountered an serious error due to #include <afxcontrolbars.h>  which is in stdafx.h. This error appeared because i did not upgrade my Visual studio 2008 to Visual studio 2008 SP1. 

I upgraded to Visual studio 2008 SP1 and solved that problem . now everything is fine.

I appreciate your time for reading my post.

Thanks.


大体的意思是,安装WDK后,在VS2008目录加上之后,WDK中有一些与VC库中相同名称的头文件,在程序编译时,就造成了一些不确定性。

所以改变包含目录中得顺序,让程序先搜索到VC自带的路径,问题解决。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值