locked
Cannot find DirectX SDK RRS feed

  • Question

  • Alright, so I decided to start learning DirectX (using C++). Every tutorial I found told me to download the latest SDK, so I downloaded it (August 2009) and installed it.

    Everything went fine until I had to use D3DXMATRIX. I did everything that the tutorial told, but I got an "identifier not found" error. I could find something called D3DMATRIX, so I googled it, but as it turns out that's a bit different so it's not a typo in the tutorial.
    My includes are:
    #include <windows.h>
    #include <d3d9.h>
    #pragma comment (lib,"d3d9.lib")

     

     

     

    When I was searching on google I also found a tutorial which said I have to put $(DXSDK_DIR)\Include into the "additional includes" in the project settings. That didn't work either.

    First question: The installer just puts the files into the directory I selected, or does it automatically integrate with VS? (I'm using 2010 beta 1)
    Second question: What am I doing wrong? I think I'm missing something very obvious here...
    Third question: I installed the sdk into a directory on my drive D:, but the d3d9.h file that I included was from C:\program files\microsoft sdks\etc..., what are those doing there? (I didn't install anything else, and I could find the standard c++ include files in VS's directory which is also on drive D:)

    Thanks,
    popperik

    Saturday, October 31, 2009 10:38 AM

Answers

  • Popperik, I hope I can help you with a couple of your questions.  Some components of the Windows SDK are included in-the-box with Visual Studio, which is why you’re seeing them on your computer. These components are installed to a standard Microsoft Windows SDK directory, which by default is C:\Program Files\Microsoft SDKs\Windows\v7.0a.  Visual Studio 2010 is configured out-of-the box to use the Windows headers, libraries and tools from this Windows SDK directory.  The Windows SDK in VS2010 includes some of the DirectX content.  If you need files from both the Windows SDK and the DirectX SDK, you’ll need to make sure your VC++ directories are set correctly so that the file can be found.  I usually set the Windows SDK header, library and executable directories higher than the DirectX directories. 

     

    1. Open the Solution containing the project.
    2. Right Click the Project node in the Solution Explorer pane and select Properties.
    3. On the Properties page, Select VC++ Directories in the left pane
    4. Select Include in the right pane and click the down arrow button and select edit
    5. In the Include Directories window you can set the directory order that you wish to build with.

     

    I highly recommend that you download Visual Studio 2010 Beta 2, which includes the Windows 7 RTM version of the Windows headers and libraries along with many other improvements.

     

    --Karin  

     

    ||Karin Meier|| Program Manager||Windows C++ Team|| Windows SDK


    Karin Meier
    • Marked as answer by Wesley Yao Friday, November 6, 2009 2:41 AM
    Sunday, November 1, 2009 6:11 AM
  • Maybe you need to include

    #include <d3dx9.h>
    #pragma comment (lib, "d3dx9.lib")
    • Marked as answer by Wesley Yao Friday, November 6, 2009 2:41 AM
    Saturday, October 31, 2009 10:45 AM

All replies

  • Maybe you need to include

    #include <d3dx9.h>
    #pragma comment (lib, "d3dx9.lib")
    • Marked as answer by Wesley Yao Friday, November 6, 2009 2:41 AM
    Saturday, October 31, 2009 10:45 AM
  • Popperik, I hope I can help you with a couple of your questions.  Some components of the Windows SDK are included in-the-box with Visual Studio, which is why you’re seeing them on your computer. These components are installed to a standard Microsoft Windows SDK directory, which by default is C:\Program Files\Microsoft SDKs\Windows\v7.0a.  Visual Studio 2010 is configured out-of-the box to use the Windows headers, libraries and tools from this Windows SDK directory.  The Windows SDK in VS2010 includes some of the DirectX content.  If you need files from both the Windows SDK and the DirectX SDK, you’ll need to make sure your VC++ directories are set correctly so that the file can be found.  I usually set the Windows SDK header, library and executable directories higher than the DirectX directories. 

     

    1. Open the Solution containing the project.
    2. Right Click the Project node in the Solution Explorer pane and select Properties.
    3. On the Properties page, Select VC++ Directories in the left pane
    4. Select Include in the right pane and click the down arrow button and select edit
    5. In the Include Directories window you can set the directory order that you wish to build with.

     

    I highly recommend that you download Visual Studio 2010 Beta 2, which includes the Windows 7 RTM version of the Windows headers and libraries along with many other improvements.

     

    --Karin  

     

    ||Karin Meier|| Program Manager||Windows C++ Team|| Windows SDK


    Karin Meier
    • Marked as answer by Wesley Yao Friday, November 6, 2009 2:41 AM
    Sunday, November 1, 2009 6:11 AM
  • Thanks a lot Karin, that's exactly the answer I was looking for!
    Friday, November 6, 2009 3:37 PM