Cannot open include file “d3dx9.h”

前端 未结 4 1223
栀梦
栀梦 2020-12-15 05:45

Edit: Of course, immediately after working on it for an hour then posting here, I found the stupid mistake...

I\'m getting compiler errors when tryi

相关标签:
4条回答
  • 2020-12-15 05:54

    I tried all of these suggestions and none worked.

    Turns out the $(DXSDK_DIR) variable doesn't work if you install DirectX while Visual Studio is still running. The solution for me was to restart Visual Studio (+ adding the paths in the solutions listed above, of course).

    0 讨论(0)
  • 2020-12-15 06:12

    I didn't realize that one of the other projects in the solution was #includeing a file that was #includeing a file that was #includeing d3dx9.h and I hadn't added those paths to that project.

    /facepalm

    0 讨论(0)
  • 2020-12-15 06:13

    you forgot one thing:

    1. Go to VC++ Directories -> Library Directories
    2. add $(DXSDK_DIR)LIB\x86
    3. apply.

    Done. Hope this helps

    0 讨论(0)
  • 2020-12-15 06:19

    You should make sure you have ALL paths sorounded by quotes ("). Instead of $(DXSDK_DIR)include you should have "$(DXSDK_DIR)include"

    0 讨论(0)
提交回复
热议问题