ほとんどの Visual Studio (2008 年ですが、重要ではないと思います) プロジェクトでビルドする場合、エラーが発生した場合は、エラーのあるファイルの絶対パスが一覧表示されます。このように (特定のエラーは無視してください。意図的に追加しました):
1>dope_external.cpp
1>c:\users\me\dope_external.cpp(4) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\users\me\dope_external.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Generating Code...
ただし、現在取り組んでいるソリューション/プロジェクトには、相対パス名がリストされています。
1>FileBasedEffect.cpp
1>..\..\..\..\..\..\..\..\tools\blah\code\src\important_file.cpp(10) : error C2653: 'FusionEffectKeys' : is not a class or namespace name
1>..\..\..\..\..\..\..\..\tools\blah\code\src\important_file.cpp(10) : error C2143: syntax error : missing ';' before 'const'
1>..\..\..\..\..\..\..\..\tools\blah\code\src\important_file.cpp(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
これは、Visual Studio で発生し、コマンド ラインから、または vcbuild を使用して別の環境でビルドした場合にも発生します。少なくとも実験として、別の環境を使用して構築したいと思います。しかし、相対パスは私を少し悩ませています。
「UseRelativePathsInBuildErrors」のように明らかなプロジェクト プロパティの違いは見当たりませんが、ビルド システムについてはよくわかりません。何か案は?ありがとう。