您的位置:首页 > 其它

Visual Studio 默认路径的修改

2013-01-15 15:45 323 查看
方法一

1.新建VS2010项目,然后在新建的项目的最下面找到“属性管理器(property manager)”选项

2 选择“microsoft.cpp.win32.user”这一项(debug或release的都行),在出来的属性框内选择“VC++目录(VC++ Directories)”,然后在“包含目录(include directories)”和“库目录(library directories)”中添加你的头文件路径和库文件路径

方法二

可以直接修改 C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\v4.0 目录下的文件:Microsoft.Cpp.Win32.user 或者是Microsoft.Cpp.X64.user

比如 原来内容为:

<?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>

XP系统的话修改C:\Program Files\Microsoft Visual Studio 10.0\VC\VCWizards中的default工程即可,修改后新建的工程都会有效,但对以前的工程无效,如果想要适用于以前工程,参加别人博客http://www.cnblogs.com/hwangbae/archive/2012/06/24/2560463.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: