blkpingu
blkpingu

Reputation: 1676

assimp import failing on Xcode

What I'm trying to do

... to import assimp, specifically:

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

and some other assimp headers.

I'm using xcode 10.2.1.

The errors im getting:

enter image description here

What I tried

enter image description here

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

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.

Upvotes: 0

Views: 508

Answers (1)

blkpingu
blkpingu

Reputation: 1676

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:

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/

Upvotes: 2

Related Questions