سؤال

Some of my code reference a library which use arm_neon.h; when I tried to compile using "Simulator", I received a bunch of errors.

I am using LLVM 4.2 compiler, what should I do to get it compiled with arm neon?

هل كانت مفيدة؟

المحلول

You can't compile ARM NEON code for the simulator because the simulator doesn't execute ARM machine code, it executes i386 machine code. See here for more info, but here is a snippet:

Don’t forget that you’ll need to disable the NEON code at compile time when building for the simulator, as your application is compiled for x86 when targeting the simulator, and NEON code will cause build errors in this context. This means you always need to also write a generic C version of the algorithm, even if you only target the iPad, or you won’t be able to run your application in the simulator.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top