Getting this error, though the library is in the Link with Binary Libraries area and the header file is included as well.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestLibraryEric", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I get this error when I build for simulator, but not for the device. I've seen this question the opposite way, where it builds for simulator but not for device. Build for active architecture only is set at NO Any ideas?
The error means that the TestLibraryEric
is only built for devices (compiled for ARM architectures), and not for the simulator (i386 architecture).
If the library is one you have created, you need to change the build settings.
In the Supported Platforms
field, you should have iphoneos
.
Add iphonesimulator
, and your library will be built both for devices and simulator.
Do a clean, rebuild the library and it should do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With