How do I make VS2010 prefer one include directory over another?
I'm trying to use the XInput.h
file from the DirectX SDK, but this file also exists in the Windows SDK (and it's a different variation of the file).
I've tried adding $(DXSDK_DIR)Include;
to the Include Directories in the project settings, before and also after $(IncludePath)
just to try and make it work.
I got VS to开发者_C百科 compile my program using the DirectX SDK version somehow, but after cleaning it went back to using the Windows SDK version... it just seems almost random, is it?
I had the same problem trying to use the August 2007 DirectX SDK (for DirectDraw) with Visual Studio 2010.
What I ended up doing was removing all of the default include paths, and only specifying the DirectX SDK path in the include list, then checking "Inherent from parent or project defaults", which includes the framework SDK.
Worked for me, hope this helps.
精彩评论