VS2013 include和lib路徑模版修改


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

修改前:

修改后:

完工...


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM