I added a SDK manually into my swift project that was wrote in obj-c and I create bridging header for the header file of it.
I can use all functions and classes defined in SDK and Xcode knows them (by changing their color and no errors) but when I run the project there is one error and one warning:
the issue navigator
warning:
ignoring file /Volumes/Macintosh HD/Users/arashetemad/Documents/MPosDocs/IOS/MESDK.framework/MESDK, missing required architecture x86_64 in file /Volumes/Macintosh HD/Users/arashetemad/Documents/MPosDocs/IOS/MESDK.framework/MESDK (3 slices)
error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_NLBlueToothV100ConnParams", referenced from:
objc-class-ref in MPos.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If MESDK is your framework you need to add the missing architecture in the build settings of MESDK project (supported architectures) to support it
If it's not yours, you need to ask from the developer to do it...
Related
I have a custom framework that I created named CCServices. When I try to implement it into my project, Setec, I get the following warnings.
ld: warning: ignoring file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCServices.framework/CCServices, file was built for x86_64 which is not the architecture being linked (arm64): /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCServices.framework/CCServices
ld: warning: ignoring file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCSocket.framework/CCSocket, missing required architecture arm64 in file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCSocket.framework/CCSocket (2 slices)
Then I get the following errors when I reference some controllers in the framework.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Conversation", referenced from:
type metadata accessor for __ObjC.Conversation in CaptionsViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I get rid of these? I have tried different solutions but nothing worked. Please note that CCSocket is written in Objective C and Setec is in Swift.
the framework was missing in the link binary with libraries list.
I tried to modified some settings to generate AsyncNetwork iOS framework.
(you can find the original AsyncNetwork from https://github.com/jdiehl/async-network)
But I got the following warning and error when using this framework I generated for iOS in my project:
ld: warning: ignoring file /MyProjectName/AsyncNetwork.framework/AsyncNetwork, missing required architecture x86_64 in file /MyProjectName/AsyncNetwork.framework/AsyncNetwork (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AsyncClient", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestion? I am testing whether AsyncNetwork (based on another great library, CocoaAsyncSocket) can perform better than MCSession in data transmission.
Thank you for precious time on my question.
You have to make a lipo to include some slices in same the .a.
There is an exemple:
lipo -create -output lib_name.a lib_name_device.a lib_name_simulator.a
You can find a tutorial here: https://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial
I have followed this tutorial LINK
but i get a linker error when i added the lib and its .h to the project.
i searched google and i found that -ObjC and -all_load should be addd in setting i did it but the error couldn't be solved.The error is as follows:
ld: warning: ignoring file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a, missing required architecture i386 in file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MathFunctions", 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)
how do i solve this?
Can you please check lipo -info libICodeMathUtils.a on terminal. If it is not listing architecture i386 that means your library is not build for simulator. And it will not work on simulator
obviously, this is not a crash , it's just a link error, your project lack of i386 version libICodeMathUtils.a, so you should first add libICodeMathUtils.a to your project.
The MathFunctions class is missing. Either from your application project or from the SimpleLibrary.a that you use. Make sure it is part of the compilation and linking steps of your build.
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
I'm using Reachability on my project to get the type of connection used, but an error has ocurred.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in ContributionViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't know what to do... my project is for iOS 4.3 and I've never had this kind of problem before.
Thx
Did you include the reachability framework in your projects linked libraries ? You can confirm by clicking on your project file on the file list and checking the build phases tab. It should be listed in the linked library section,