Microsoft Visual C++ 2010 ディレクトリの設定方法
VC++ 2010 からはツール→オプション→プロジェクトおよびソリューション→VC++ ディレクトリ(GUI)でのグローバルなパスの設定が非推奨となりました.
代わりに,VC2010 では次のようにしてグローバルなパスを設定をします(VC++ ディレクトリが、オプションダイアログから消えている).
- Express Edition の場合
- それ以外のエディションの場合
- ファイルを直接編集したい場合
- パスやファイル名は適宜読み替えてください.
- XP の場合は C:\Documents and Settings\(ユーザー名)\Local Settings\Application Data\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props です.
- ファイルを例えば次のように編集する.
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <IncludePath>$(IncludePath);C:\Program Files\boost\include\boost-1_42;C:\Program Files\boost\include\boost-sandbox;C:\Program Files\clapack\include</IncludePath> <LibraryPath>$(LibraryPath);C:\Program Files\boost\lib;C:\Program Files\clapack\lib</LibraryPath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <IncludePath>$(IncludePath);C:\Program Files\boost\include\boost-1_42;C:\Program Files\boost\include\boost-sandbox;C:\Program Files\clapack\include</IncludePath> <LibraryPath>$(LibraryPath);C:\Program Files\boost\lib;C:\Program Files\clapack\lib</LibraryPath> </PropertyGroup> </Project>
この例では Win32 プラットフォームの Debug, Release 構成に
- インクルード ディレクトリ
- C:\Program Files\boost\include\boost-1_42
- C:\Program Files\boost\include\boost-sandbox
- C:\Program Files\clapack\include
- ライブラリ ディレクトリ
- C:\Program Files\boost\lib
- C:\Program Files\clapack\lib
を追加しています.
本 props ファイルのフォーマットについてはプロジェクトのプロパティ シート(*.vcxproj)が参考になると思います.
以上です.