制作ARToolKitPlus dylib后ARToolkitPlus头文件出现问题!

发布于 2024-08-29 11:33:29 字数 959 浏览 8 评论 0原文

我正在为 iPhone 编写这个增强现实应用程序,我决定使用 ARToolKitPlus 。使用 QMake,我创建了 xcode 项目文件,随后创建了 libArToolKitPlus.dylib

我尝试编译并运行示例文件“simple”和“multi”,效果很好。现在,由于找不到头文件,我尝试创建另一个项目并使用该库的所有其他尝试都失败了。如果我将“include”文件夹拖到 xcode 项目中,我会收到 8 个错误,而不仅仅是一个;一个是未找到的主要包含已解决,但它包含无法找到的其他 8 个标头(尽管它们位于同一文件夹中)

#include "ARToolKitPlus/TrackerSingleMarkerImpl.h"

我收到错误: ARToolKitPlus/TrackerSingleMarkerImpl.h:没有这样的文件或目录

如果我拖动包含文件夹,然后得到一些内容:

  • 错误:ARToolKitPlus/TrackerSingleMarker.h:没有这样的文件或目录
  • 错误:../src/TrackerSingleMarkerImpl.cpp:没有这样的文件或目录
  • 错误:之前预期的类名',' 标记

    类 TrackerSingleMarkerImpl :公共 TrackerSingleMarker,受保护的 TrackerImpl<__PATTERN_SIZE_X,__PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS>

据我所知,拥有 dylib 并没有什么区别。你认为我应该做什么?创建一个框架会有帮助吗?

I'm writing this Augmented Reality app for the iPhone and I'd decided to use ARToolKitPlus for it. Using QMake, I created the xcode project file and subsequently the libArToolKitPlus.dylib

I tried to compile and run the sample files "simple" and "multi" which worked well. Now all other attempts that I tried to create another project and use the library have failed due to header files not being found. If I drag the "include" folder to the xcode project I get 8 errors instead of just one; The one is for the main include not being found is solved but then it includes 8 other headers that cannot be found (although they are in the same folder)

#include "ARToolKitPlus/TrackerSingleMarkerImpl.h"

I get a error: ARToolKitPlus/TrackerSingleMarkerImpl.h: No such file or directory

If I drag the include folder then some of what I get:

  • error: ARToolKitPlus/TrackerSingleMarker.h: No such file or directory
  • error: ../src/TrackerSingleMarkerImpl.cpp: No such file or directory
  • error: expected class-name before ',' token

    class TrackerSingleMarkerImpl : public TrackerSingleMarker, protected TrackerImpl<__PATTERN_SIZE_X,__PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS>

Having the dylib doesnt make a difference as far as I can tell. What do you think I should do?? Would creating a framework help??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉月流沐 2024-09-05 11:33:35

我想通了...这是一个 xcode 问题,它没有在标头搜索路径中包含“include”文件夹。手动操作一下,问题就解决了!

I figured this out... It was an xcode problem, it was not including the "include" folder in the header search path. Did that manually and the problem was solved!

水晶透心 2024-09-05 11:33:34

我不确定这样做是否可以“从版权角度考虑”。但这里是如何做到这一点。

  1. 在 XCode 中,创建一个名为:ARToolKitPlus(或您喜欢的任何名称)的新组。
  2. 将“src”和“include”文件夹从原始 ARToolKitPlus 文件夹拖到您创建的组中。
  3. 右键单击“include”和“src”文件夹并选择“获取信息”,找到“include”和“src”文件夹的位置,
  4. 在“获取信息”窗口中复制这些路径。
  5. 打开项目设置,选择“所有配置”,找到“标题搜索路径”,可以直接搜索。
  6. 将从信息窗口复制的路径添加到标题搜索路径中,确保补偿空格(或者更好的是,路径中没有空格)。
  7. 确认并使其递归,瞧!

I'm not sure its ok "copyright wise" to do so. But here's how to do it.

  1. In XCode, create a new group called: ARToolKitPlus (or whatever u like).
  2. Drag the "src" and "include" folders from the original ARToolKitPlus folder to the group you created.
  3. Find the location of both the "include" and "src" folders by right clicking on each and selecting "Get Info"
  4. Copy these paths in the "Get Info" window.
  5. Open the project settings, choose "All configurations" and find "Header Search Paths", you can search for it directly.
  6. Add the paths you copied from the info window to the header search paths, make sure you compensate for spaces (or even better, have no spaces in your paths).
  7. Confirm and make it recursive, and voila!
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文