在Xcode上assimp导入失败

布尔克平古

我想做什么

...导入asimp,具体是:

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

和其他一些assimp标头。

我正在使用xcode 10.2.1

我得到的错误:

在此处输入图片说明

我尝试了什么

  • 我在与库一起安装的Link Binary with Libraries中导入了assimp brew install assimp

  • 我重新安装了assimp brew reinstall assimp,以防万一。

在此处输入图片说明

什么也没有变。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.

blkpingu

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

scroll down to: search paths

there, find: header search paths

double click on it, then add by clicking +

add: /usr/local/Cellar/assimp/4.1.0/include as non-recursive

Disclaimer:

根据不建议安装它的方式,或者不建议在系统范围内安装Homebrew(取决于是否安装),assimp可能位于其他目录中。就我而言/usr/local/Cellar/

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

TOP 榜单

热门标签

归档