无法打开包含文件“d3dx9.h" [英] Cannot open include file "d3dx9.h"

查看:37
本文介绍了无法打开包含文件“d3dx9.h"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当然,在工作了一个小时然后在这里发帖后,我发现了一个愚蠢的错误......

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

我在项目中尝试 #include 时遇到编译器错误.我收到致命错误 C1083:无法打开包含文件:‘d3dx9.h’:没有这样的文件或目录".

I'm getting compiler errors when trying to #include <d3dx9.h> in a project. I'm receiving "fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory".

  • 我确实安装了 DirectX SDK(我也只是尝试重新安装它但无济于事).
  • 在项目属性中:
    • VC++ 目录设置为$(DXSDK_DIR)Include;$(IncludePath)"和$(DXSDK_DIR)Lib\x86;$(LibraryPath)"所有配置分别包含和库目录—环境变量%DXSDK_DIR%指向C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\ as
    • C/C++ > 常规设置在附加包含目录中列出了 $(DXSDK_DIR)include
    • Linker > Input > Additional Dependencies 包含用于调试的 d3dx9d.lib 和用于发布配置的 d3dx9.lib.
    • I do have the DirectX SDK installed (I also just tried reinstalling it to no avail).
    • In the Project Properties:
      • VC++ Directories are set to "$(DXSDK_DIR)Include;$(IncludePath)" and "$(DXSDK_DIR)Lib\x86;$(LibraryPath)" for Include and Library directories respectively for all configurations—and the environment variable %DXSDK_DIR% points to C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\ as expected.
      • C/C++ > General settings has $(DXSDK_DIR)include listed in the Additional Include Directories
      • Linker > Input > Additional Dependencies has d3dx9d.lib included for Debug and d3dx9.lib included for Release configuration.

      对我忘记的内容或其他尝试有什么建议吗?

      Any suggestions on what I'm forgetting or what else to try?

      谢谢

      推荐答案

      我没有意识到解决方案中的其他项目之一是 #include 处理一个 # 的文件包含#included3dx9.h 的文件,但我没有将这些路径添加到该项目中.

      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.

      /面掌

      这篇关于无法打开包含文件“d3dx9.h"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆