在Xcode上assimp导入失败 [英] assimp import failing on Xcode

查看:253
本文介绍了在Xcode上assimp导入失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

...导入asimp,具体是:

... to import assimp, specifically:

#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>

和其他一些assimp标头.

and some other assimp headers.

我正在使用 xcode 10.2.1 .

错误提示:

  • 我在与库链接的二进制文件中导入了assimp,该库与brew install assimp

我为brew reinstall assimp重新安装了assimp,以防万一.

I reinstalled assimp with brew reinstall assimp, just in case.

什么都没有改变. Xcode仍然无法解决依赖关系.

Nothing has changed. Xcode still can't resolve the dependency.

我尝试删除错误所指向的导入,但是它只是再次出现在下一个assimp导入中,因为即使我从/usr/local/Cellar/assimp/4.1.0/lib添加了libassimp4.1.0.dylib,xcode也无法解析该导入.我在这里迷路了.应该可以,但是不能.我以这种方式导入了其他库,但从未遇到问题.

I tried deleting the import the error is pointing on, but it just showed up at the next assimp import again, as in, xcode can't resolve the import, even though I added libassimp4.1.0.dylib from /usr/local/Cellar/assimp/4.1.0/lib. I'm lost here. This is supposed to work, but it doesn't. I imported other libs this way and never had an issue.

推荐答案

我修复了它,这是这样的:

我通过将xcode指向标头来修复了编译器错误.它在某种程度上不适用于自制软件安装,因此我手动添加了它.

I fixed it and this is how:

I fixed the compiler error by pointing xcode to the headers. It somehow didn't work with the homebrew installation, so I added this manually.

在您的应用设置"中,转到:构建设置

In your App settings, go to: build settings

向下滚动至:搜索路径

找到以下内容:标题搜索路径

双击它,然后单击 +

添加:/usr/local/Cellar/assimp/4.1.0/include非递归

根据不推荐的安装方式(不建议在系统范围内安装Homebrew),assimp可能位于其他目录中.在我的情况下是/usr/local/Cellar/

Depending on how you installed it or if or if not you installed Homebrew systemwide, which is not recommended, assimp might live in a different directory. In my case it was /usr/local/Cellar/

这篇关于在Xcode上assimp导入失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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