码迷,mamicode.com
首页 > 其他好文 > 详细

VS2013 include和lib路径模版修改

时间:2014-05-29 12:26:08      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   tar   

昨天安装BCGControlBar Professional Evaluation后,原来的VS C++工程编译报错,新建工程也报错。不能打开“SDKDDKVer.h”文件。这是编译器自动生成的文件,怎么会不能打开呢。想想肯定是路径包含的问题。

今早,同事来上班,对比了下我们两的默认路径设置,我得配置如下:

bubuko.com,布布扣

而同事的编译器默认include路径为:

bubuko.com,布布扣

显然,简单明了很多。

于是,问度娘:“如何修改VS中include directories模版路径”。

于是,就来到了这里http://www.cnblogs.com/lizmy/archive/2012/01/10/2318258.html

原文如下:

2010中是以工程为单位,更改VC++ directories。每个工程都修改一便很是繁琐,因此想修改下默认VC目录。

从网上查了下,主流的方法是:

View-> Other windows –> Property Manager

bubuko.com,布布扣

bubuko.com,布布扣

公共静态库的设置

bubuko.com,布布扣

但对于 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菜单下

bubuko.com,布布扣

修改是将include和lib路径下乱七八糟的路径删除,集成原来的路径:

修改前:bubuko.com,布布扣

修改后:bubuko.com,布布扣

完工...

VS2013 include和lib路径模版修改,布布扣,bubuko.com

VS2013 include和lib路径模版修改

标签:c   style   class   blog   code   tar   

原文地址:http://www.cnblogs.com/heartbeat/p/3756550.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!