昨天安装BCGControlBar Professional Evaluation后,原来的VS C++工程编译报错,新建工程也报错。不能打开“SDKDDKVer.h”文件。这是编译器自动生成的文件,怎么会不能打开呢。想一想确定是路径包含的问题。html
今早,同事来上班,对比了下咱们两的默认路径设置,我得配置以下:web
而同事的编译器默认include路径为:express
显然,简单明了不少。windows
因而,问度娘:“如何修改VS中include directories模版路径”。ui
因而,就来到了这里http://www.cnblogs.com/lizmy/archive/2012/01/10/2318258.htmllua
原文以下:spa
2010中是以工程为单位,更改VC++ directories。每一个工程都修改一便非常繁琐,所以想修改下默认VC目录。code
从网上查了下,主流的方法是:orm
View-> Other windows –> Property Managerxml
公共静态库的设置
但对于 express 版本,没有Property manager窗口,所以修改这份文件:
Win7下: C:\Users\<user>\AppData\Local\Microsoft\MSBuild\v4.0
32位版本: Microsoft.Cpp.Win32.user.props
64位版本: Microsoft.Cpp.x64.user.props
默认:
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> </Project>
修改成:
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ExecutablePath>$(ExecutablePath)</ExecutablePath> <IncludePath>D:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;$(IncludePath)</IncludePath> <ReferencePath>$(ReferencePath)</ReferencePath> <LibraryPath>D:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;$(LibraryPath)</LibraryPath> <SourcePath>$(SourcePath)</SourcePath> <ExcludePath>$(ExcludePath)</ExcludePath> </PropertyGroup> </Project>
修改Linker –> Input –> Addition Dependencies
------引用完
”属性管理器“不必定在Other Windows菜单下
修改是将include和lib路径下乱七八糟的路径删除,集成原来的路径:
修改前:
修改后:
完工...