I downloaded a C library for an audio codec, I compile it and add it to my project.
Now, every time I try to use it it gives me a Undefined symbols for architecture armv7: error when I try to call one of the methods of the library.
What could it be the problem? Do I need to compile the library specific for armv7?
You seem to have set up your XCode project such that is compiles for both the
armv7andarmv7sarchitecture (note that s at the end). However, the project for the C library is only compiled forarmv7.To fix, either change the library project so that it compiles for both architectures as well, or change the app project to only compile for
armv7.I’d go for the second option as there is currently no need for
armv7ssupport and very few devices out that can use it.Update:
If your getting the same message for the simulator as well, then your library project isn’t compiled for ‘i386’ neither (which is required for the simulator only). It indicates that your C library project isn’t set up at all for compiling for multiple architectures. So the second option (and not using the simulator) is the easiest approach.