William Lovelace
William Lovelace

Reputation: 11

Downloaded visual stuios 2012 for windows cant find dx.h

I downloaded visual studios 2012 express for windows so I can use the windows 8 direct2d effects. I tried to follow the starting project on msdn it says include the d2d1.h and d2d1_1.h headers

first line of code says

DX::ThrowIfFailed(
        D2D1CreateFactory(
            D2D1_FACTORY_TYPE_SINGLE_THREADED,
            __uuidof(ID2D1Factory1),
            &options,
            &m_d2dFactory
            )
        );

I cant find DX::ThrowIfFailed only things listed is DXG. I read the header file I need is dx.h but I tried including it and it was not in the include directive anyone know the problem.

Upvotes: 0

Views: 603

Answers (2)

zdd
zdd

Reputation: 8757

You should install the Windows 8 SDK if you want to use DirectX component(including direct3d, direct2d, directwrite, xaudio2 ...), you have many choices here

  1. Install Visual Studio 2012, it includes the Windows 8 SDK by default, but I am doubt if the express version has the SDK, you can try the 90 days trial Ultimate version.
  2. Install other version of Visual Studio and install the Windows 8 SDK, Windows 8 SDK has a stand alone version for Visual Studio 2010
  3. Install DirectX SDK, the last version is DirectX 2010 June, it also include the Direct2D, but you should take care if you mix use DirectX SDK and the Windows 8 SDK.

If you are running Windows 8, the first option is recommended.

Where is the DirectX SDK(from DirectX SDK blog)

Where is the DirectX SDK(a more detail version from MSDN)

Upvotes: 0

jbq
jbq

Reputation: 191

You need to install the Directx SDK to get those headers.

Directx SDK @ microsoft.com

Upvotes: 2

Related Questions