昨天安裝BCGControlBar Professional Evaluation后,原來的VS C++工程編譯報錯,新建工程也報錯。不能打開“SDKDDKVer.h”文件。這是編譯器自動生成的文件,怎么會不能打開呢。想想肯定是路徑包含的問題。
今早,同事來上班,對比了下我們兩的默認路徑設置,我得配置如下:
而同事的編譯器默認include路徑為:
顯然,簡單明了很多。
於是,問度娘:“如何修改VS中include directories模版路徑”。
於是,就來到了這里http://www.cnblogs.com/lizmy/archive/2012/01/10/2318258.html
原文如下:
2010中是以工程為單位,更改VC++ directories。每個工程都修改一便很是繁瑣,因此想修改下默認VC目錄。
從網上查了下,主流的方法是:
View-> Other windows –> Property Manager
公共靜態庫的設置
但對於 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路徑下亂七八糟的路徑刪除,集成原來的路徑:
修改前:
修改后:
完工...