无法打开包含文件“AIUtilities.h”:没有此类文件或目录。但它存在吗? [英] Cannot open include file "AIUtilities.h": No such file or directory. But it exists?

查看:244
本文介绍了无法打开包含文件“AIUtilities.h”:没有此类文件或目录。但它存在吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个项目: AI 核心,用于保存循环依赖关系。我有一个 CoreUtilities 文件,我已经分解删除此依赖关系,并将我已删除的函数添加到一个名为AIUtilities(.cpp / .h)的新文件。

I have a two projects, AI and Core, which used to hold a circular dependency. I have a CoreUtilities file that I have broken up to remove this dependency, and added the functions I have removed to a new file called AIUtilities(.cpp/.h).

然后我在我的AI项目中使用这些函数,并添加了 #includeAI / AIUtilities.h并将 CoreUtilities :: Functionname 的函数调用更改为 AIUtilities :: Functionname 。编译时,我收到标题中给出的错误。

I then went to the piece in my AI project that uses these functions and added #include "AI/AIUtilities.h" and changed the function call from CoreUtilities::Functionname to AIUtilities::Functionname. Upon compile, I recieved the error given in the title.

为什么!

推荐答案

是否使用包含AI / AIUtilities的路径更新项目设置? p>

更新:



Did you update your project settings with the path to the direcory containing AI/AIUtilities?


  1. 在解决方案资源管理器窗口中,右键单击项目, 属性,则将弹出新窗口your_project_name属性页。

  2. 在左窗格的此窗口中,您将看到一个树。点击配置属性,展开为多个选项。继续单击C / C ++,然后单击常规。在右侧窗格中会显示影响您的项目的多个属性。

  3. 选择其他包含目录属性,并将路径添加到新目录。例如,如果您的路径是:C:\AI\AIUtilities.h在属性中添加以下:C:\。

  4. 单击Aplpy按钮 。已完成。

  1. From the solution explorer window, right click on your project and choose "properties" then a new windows "your_project_name property page" will pop up.
  2. In this window on the left pane you'll see a tree. Click on 'Configuration properties' which expands to multiple choices. Continue clicking on 'C/C++' then on General. On the right pane appears multiple properties that affect your project.
  3. Choose the "Additional include directories" property and add the path to your new directory. For instance if your path is : "C:\AI\AIUtilities.h" add the following: "C:\" in the property.
  4. Click on "Aplpy button". Done.

如其他文章所述,您必须考虑移动项目会破坏您的项目设置。不要忘记更新它们。或者使用环境变量来设置项目的根目录或使用../../技巧。但personnaly我喜欢前者。

As mentioned in other post, you must consider that moving your project around will break your project settings. Don't forget to update them. Or use either environnement variable to set the root of your project or use the "../../" trick. But personnaly I prefer the former.

这篇关于无法打开包含文件“AIUtilities.h”:没有此类文件或目录。但它存在吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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