VS2008下编译错误(error C2065: '_S1max' : undeclared identifier)的解决办法
2011-11-08 13:53
666 查看
最近用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 toVisual
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自带的路径,问题解决。
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 toVisual
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自带的路径,问题解决。
相关文章推荐
- error:VC编译错误:error C2065: '_beginthreadex' : undeclared identifier
- VC++6.0原始套接字出现 C2065:'SIO_RCVALL' : undeclared identifier错误的解决方法
- PLS-S-00201, identifier 'CALLDEMO.GET_EMPLOYEES' must be declared 预编译错误原因及解决办法
- VC编译错误:error C2065: 'strcpy_instead_use_StringCbCopyA_or_StringCchCopyA' : undeclared
- VS2003编译OGRE error C2065: '__in' : undeclared identifier 解决
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- VS2008LINK : fatal error LNK1000: Internal error during IncrBuildImage编译错误解决办法
- linux 编译中required file `./ltmain.sh' not found 错误的解决办法
- 问题 error C2065: '_beginthreadex' : undeclared identifier 的解决办法
- MySQL 编译出现 error: 'SSL_OP_NO_COMPRESSION' undeclared (first use in this function) 错误
- error C2065: 'AfxCriticalTerm' : undeclared identifier 解决办法
- 安装BCGControlBar 编译错误解决办法 fatal error C1033: cannot open program database '*:/**/vc60.idb'
- SQL SERVER 2008报Invalid object name 'master.dbo.spt_values'. (Microsoft SQL Server, Error: 208)错误的解决办法。
- Uncaught TypeError: Cannot read property 'drawImage' of undefined错误的解决办法
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译过程中弹出new(35) : error C2061: syntax error : identifier 'THIS_FILE'问题的原因及解决方法
- glog0.3.5 编译错误error C2065: 'uint64_t' : undeclared identifier
- 国外空间Microsoft JET Database Engine error '80004005' 错误解决办法
- Linux NFS启动出现出现错误TFTP error: 'Access violation' 的解决办法