syntax error: identifier 'DXGI_RGBA in file dxgi1_2.h


Trying to integrate the Directx toolkit into my game. I followed the steps here:


and everything went great. When trying to include one of the headers (SpriteFont.h) I get these errors (see attached picture)

I've refactored the project to 8.1 to match my game, and rebuilt the imported project and it works great. It's when rebuilding my project that I get these error.

(I've already made sure windows.h is being included before my directx headers.

Closed Jul 5, 2016 at 6:12 AM by walbourn


walbourn wrote Jul 5, 2016 at 6:12 AM

Answered in email.

This is likely because you are using the legacy DirectX SDK headers mixed with Windows 8.x SDK headers. Ideally you just remove the use of the legacy DirectX SDK paths entirely. If you need the legacy DirectX SDK such as to support XAudio 2.7 on Windows 7, then you must have the Windows 8.x SDK include/lib paths before the legacy DirectX SDK.

See MSDN for the details.