【解決】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 目錄下