ofxAssimpModelLoader not compiling in iOS with OF0.10.1

#1

I’m trying to utilize ofxAssimpModelLoader but it does not compile on iOS (Xcode 10.1).

I found an old issue on GitHub that points to the same error I have:

Undefined symbols for architecture arm64:

“irr::io::createIrrXMLReader(irr::io::IFileReadCallBack*)”, referenced from:

Assimp::IRRImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in assimp.a(IRRLoader.cpp.o)

Assimp::XGLImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in assimp.a(XGLLoader.cpp.o)

Assimp::D3MFImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in assimp.a(D3MFImporter.cpp.o)

Assimp::IRRMeshImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in assimp.a(IRRMeshLoader.cpp.o)

Assimp::AMFImporter::ParseFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Assimp::IOSystem*) in assimp.a(AMFImporter.cpp.o)

Assimp::Ogre::OgreImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in assimp.a(OgreImporter.cpp.o)

Assimp::ColladaParser::ColladaParser(Assimp::IOSystem*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in assimp.a(ColladaParser.cpp.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ideas on how to solve this?

#2

My solution is to build the assimp libraries from the source code. ( I don’t know whether it is a good solution or not. :slight_smile: )

  1. Donwload the source code from https://github.com/assimp/assimp
  2. Build the library. https://github.com/assimp/assimp/tree/master/port/iOS
  3. Copy the “libassimp.a”, “libIrrXML.a”, “libzlibstatic.a” and the “include” folder to ofAssimpModelloader (“include” folder and “ios/lib” folder)

It works at oF 0.10.1 (git master version), iOS 12.1, Xcode 10.1.

1 Like
#3

Thank you @jeonghopark!

I managed to run the examples but I needed one additional step.

I needed to add manually the files xcode, and I needed to rename 3 files to:
lassimp.a
lIrrXML.a
lzlibstatic.a

#4

or you can use the projector generator. :wink:

1 Like