3
votes

I am trying to continue working on my VS2010 project in VS2012. I use Directx 11 (june 2010) release and whenever I debug my code, bunch of warnings pops up.

Like this:

6>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\D2DErr.h(59):
warning C4005: 'D2DERR_WRONG_STATE' : macro redefinition
6>C:\Program Files\Windows Kits\8.0\Include\shared\winerror.h(49859):
see previous definition of 'D2DERR_WRONG_STATE'
6>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\D2DErr.h(64):
warning C4005: 'D2DERR_NOT_INITIALIZED' : macro redefinition
6>C:\Program Files\Windows Kits\8.0\Include\shared\winerror.h(49868):
see previous definition of 'D2DERR_NOT_INITIALIZED'

Is there a way to make warnings disappear, without disabling them. Or should I convert my code to windows sdk 8.0 which has directx in it and then completely remove old DX (june 2012) from project.

1

1 Answers

5
votes

It's complicated. MSDN has a lengthy page with the full story.

In a nutshell: Parts of the DXSDK are now included in the Win8 SDK. If you want to use those with VS2012, you're probably best off without using the DXSDK. Unfortunately, certain parts of DX are no longer supported by Microsoft and hence have not been included in the new Win8 SDK. Prominent example is the D3DX utility library. If you want to use those, you will have to pull in the old DXSDK.

In this case you'll have to make sure to not include the same header in different versions from both SDKs, which can be quite a pain. An easy workaround for this case is to move only the headers you need from the DXSDK to a separate include directory to avoid accidentally pulling in the wrong headers.