vc2010包含文件与库文件目录添加

【解决】VC 2010(10.0)设置头文件、库文件路径

VC 2010(10.0)中,如何设置头文件、库文件路径?

在VC2010的Tools——Options里面设置,属性页显示“*** has been deprecated”! 于是,按照提示,在工程属性窗口(Project——Properties),“Configuration Properties”——“VC++ Directories”里面设置。然后,我退出VC,重新运行并新建工程,新工程里面的包含路径却没有改变!

如此,在这里设置,和在工程属性窗口的“Configuration Properties”——“C++”——“General”里面设置,岂不是一样的效果?

或许我的方法不对?

 

2011.03.02注:

参考:http://topic.csdn.net/u/20090717/11/035cb8b3-21d9-4749-b104-70911f2ec056.html

作者:guanlq

可以直接修改 <drive>:\Documents and Settings\ <user>\Local Settings\Application Data\Microsoft\MSBuild\v4.0. 目录下的文件。Microsoft.Cpp.Win32.user (32位平台) 或者是Microsoft.Cpp.X64.user(64位平)
比如 原来内容为:
<?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>$(IncludePath)</IncludePath>
  <ReferencePath>$(ReferencePath)</ReferencePath>
  <LibraryPath>$(LibraryPath)</LibraryPath>
  <SourcePath>$(SourcePath)</SourcePath>
  <ExcludePath>$(ExcludePath)</ExcludePath>
  </PropertyGroup>
</Project>

我现在需要增加一个目录:
C:\Boost\include\boost-1_43\;到默认头Include 路径,则可以修改文件如下:
<?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>C:\Boost\include\boost-1_43\;$(IncludePath)</IncludePath>
  <ReferencePath>$(ReferencePath)</ReferencePath>
  <LibraryPath>$(LibraryPath)</LibraryPath>
  <SourcePath>$(SourcePath)</SourcePath>
  <ExcludePath>$(ExcludePath)</ExcludePath>
  </PropertyGroup>
</Project>

 

 

win7在C:\Users\hugo\AppData\Local\Microsoft\MSBuild\v4.0 目录下

 

posted on 2012-08-03 10:44  张 勇  阅读(6345)  评论(0编辑  收藏  举报

导航