Error C2061 : How to solve this error?

May 29, 2014 at 5:16 PM
Edited May 29, 2014 at 5:18 PM
Hello, I'm Jongmin Lim, a university student in Korea.
I want to ask a question about C2061 error. My English is bad, so i hope your understand.

I'm making a 3D game using D3DX11.

My team made parser, wrote shader code and could make the program render scene.

Yesterday, we had to draw some pictures on the screen for UI , so we googled for looking for good library and found this site.

Watching the DirectXTK tutorial03 on Youtube, we did do download, do reference, include inc folder and type #include "SpriteBatch.h", but an error appeared like below.



Error 31 error C2061: syntax error : identifier 'DXGI_RGBA' c:\program files (x86)\windows kits\8.1\include\shared\dxgi1_2.h 1275 1 renderingframework



I haven't solved this problem until now. It will be an honor if anybody tell me how to solve this problem.

Thank you for reading.
Coordinator
May 29, 2014 at 7:03 PM
If you are using the legacy D3DX11 library, then I assume you are trying to use both the DirectX SDK and the Windows 8.x SDK. This can be done, but requires some care with the header and lib include ordering. See

Where is the DirectX SDK? (MSDN)
Where is the DirectX SDK (2013 Edition)?
Where is the DirectX SDK?

I'd recommend not using D3DX11 at all, and instead use DirectXTK and/or DirectXTex as appropriate. See Living without D3DX
Marked as answer by walbourn on 5/29/2014 at 12:03 PM