Im trying to work with direct x 9 / 10 right now but as soon as I add
C:\Program Files %28x86%29\Microsoft DirectX SDK %28November 2008%29\Include
to my include directory and
C:\Program Files %28x86%29\Microsoft DirectX SDK %28November 2008%29\Lib\x86
to my library directories
I get 397 errors mostly consisting of
identifier "__RPC__inout_xcount" is undefined
and
expected a ')' solution C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\OAIdl.h 5621
I don't understand what's causing all these errors in dlls I never touched which is located in a folder which I haven't seen before. Any help is appreciated
The basic issue is that you have to reverse the include/lib path search order to use the legacy DirectX SDK in combination with the Windows 10 SDK.
For x86/Win32 configurations:
For x64 native configurations:
Alternatively, you need to use the
v14?_xp
Platform Toolset which uses the Windows 7.1A SDK instead.See Microsoft Docs and this blog post.
A better option is to not use the legacy DirectX SDK at all, which means using DirectX 11 instead of the older DX9/DX10 APIs. See Living without D3DX.
There are also various StackOverflow threads that are all the same basic issue: