Microsoft Visual C++ 2010 ディレクトリの設定方法

VC++ 2010 からはツール→オプション→プロジェクトおよびソリューション→VC++ ディレクトリ(GUI)でのグローバルなパスの設定が非推奨となりました.
代わりに,VC2010 では次のようにしてグローバルなパスを設定をします(VC++ ディレクトリが、オプションダイアログから消えている).

<?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)が参考になると思います.

以上です.