After upgrade xcode to 10.1 the project's compile fails with :
ld: warning: directory not found for option '-L/Users/divanov/Desktop/<projectName> AppTests'
Undefined symbols for architecture arm64:
"_RCTSetLogFunction", referenced from:
-[AppTests testRendersWelcomeScreen] in AppTests.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The following work around worked for me:
in XCode select the project in the left panel
Click on "Build Settings"
In the "Linking" section, find"Dead Code Stripping" section and change it "No"
Clean and Build
*** In another project I got the same error but in that case the libraries were missing in "Settings of the failing Target"/"Build Phases"/"Link Binary With", so I had to add them manually!
Related
All of a sudden I am getting the following compile error in my project:
Undefined symbols for architecture arm64:
"_sqlite3_mprintf", referenced from:
_linphone_core_store_call_log in liblinphone.a(call_log.c.o)
_linphone_chat_message_store in liblinphone.a(message_storage.c.o)
_linphone_chat_message_store_state in liblinphone.a(message_storage.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like your Xcode project is missing a reference to sqlite3 that is required by liblinphone:
Open your Xcode project file
Go the "General" tab
Look for the section that says "Linked Frameworks and Libraries"
Press the "+" button
Search for "sqlite"
Click on "libsqlite3.dylib" and press "Add"
Now it should build and run.
I downloaded the new xcode beta version and that fixed it.
From this link MediaLibDemos3x , I downloaded source code and I am running it in X-Code 6.3.2 but I am getting following two errors . Can any one check it please give me a solution?
Error 1-
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_BroadcastStreamClient", referenced from:
objc-class-ref in ViewController.o
Error 2-
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems the included library are not compiled for i386 (or simulators) so you must run code on real device. See author comment here and here
Undefined symbols for architecture i386
You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target.
To do this:
Target Settings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run
run your app on device.
I have a project that uses CocoaPods. It was working but something got broken.
It does compile if I target the simulator, but If I target the devise (Build or Archive) it throws a linker error.
ld: warning: ignoring file /Users/myuser/ios/share/share/libPods.a, file was built for archive which is not the architecture being linked (armv7s): /Users/myuser/ios/share/share/libPods.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in BackendProxy.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I really need some help because I am really stucked.
Thanks!
EDIT: i deleted that libPods.a, that was an old one, and now it's giving me:
ld: library not found for -lPods
But only on Archive or Build for iosDevice, this is still working on the simulator.
Try removing armv7s from valid architectures section.
Build Settings -> Architectures -> Valid Architectures
How to build a static library for simulator on Xcode 4.6?
I've tried "https://github.com/kstenerud/iOS-Universal-Framework". But got an error while using that framework on demo.
Error is like:
ld: warning: ignoring file /Users/shuvo/test_lib/Demo(V.1)/myProject.lib/libMyProjectLibrary.a, missing required architecture i386 in file /Users/shuvo/test_lib/Demo(V.1)/myProject.lib/libMyProjectLibrary.a (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_showScreen", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I came across the same problem,and solve it by setting the static lib's run configuration as Release in the scheme editor.
here is the words in the document of iOS-Universal-Framework, section "Building your iOS Framework":
step 2.(optional) Set the "Run" configuration in the scheme editor.
It's set to Debug by default but you'll probably want to change it to
"Release" when you're ready to distribute your framework.
the key is the "Build Active Architecture Only" in Build Settings,
Debug is set to NO by default
When adding iRate to my app I get this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_iRate", 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)
Sounds like when you added the .m file to your project, it wasn't assigned to your target. Select iRate.m in the project navigator. Then bring up the utilities view on the right side of Xcode. Under Target Membership, make sure your app's target is checked. Try the build again.