I've come across a strange thing.
Visual Studio 2008 Project: Include/Libraries folder of the DirectX SDK have been added via Tools->Options->Projects and Solutions->VC++ Directories.
The required include file dsound.h from the DirectX SDK is correctly referenced.
Compilation and linking works fine
Now on another machine, running Visual C++ 2008 Express with the same settings...
Compilation and linking works fine
But via MSBuild from the VS Express cmd line, the include path to the DirectX SDK is missing and the compilation of course fails.
Could this be a problem of the Express edition? How would you work around it, without adding the per-machine related include path to the project itself?
I was unable to find a global config file for MSBuild 2008, where some global compiler paths could be added.
However, you can add the paths to the include and library lists of the project from Visual Studio GUI. They get stored in the vcproj file, and used by MSBuild.
In my case I simply added this to the respective project directories:
$(DXSDK_DIR)\Include
$(DXSDK_DIR)\Lib\x86
Then you can call MSBuild as usual:
MSBuild.exe /nologo /v:minimal /p:Configuration=Debug