昨天安裝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路徑下亂七八糟的路徑刪除,集成原來的路徑:
修改前:
修改後:
完工...