Missing files, DirectX SDK (d3dx9.lib, d3dx9.h)

前端 未结 4 1555
面向向阳花
面向向阳花 2021-02-02 17:35

I installed the DirectX SDK June 10, but when I include the d3dx9.h, the compiler can\'t find it.

I checked the SDK directory, and I didn\'t fi

4条回答
  •  离开以前
    2021-02-02 18:10

    The DirectX SDK installation will add a system environment variable DXSDK_DIR that holds the path to wherever the SDK was installed to. Instead of inserting an absolute path in your Include and Library Directories, I'd recommend using this variable to set the Include and Library path for DX dependencies.

    As Include Directory add: $(DXSDK_DIR)Include

    As Library Directory add: $(DXSDK_DIR)Lib\x86 or $(DXSDK_DIR)Lib\x64 on a 64-bit architecture

    So your VC++ Directories should look something like this:

    The $(DXSDK_DIR) resolves to the path where you installed the SDK, normally "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" and works even if you chose another path, which makes it more available between different people.

提交回复
热议问题