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

最近用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自带的路径,问题解决。


你可能感兴趣的:(c,File,Path,include,compiler,tools)