I am using Unity3D5.2 to export a iOS project, but when compile in Xcode encounter this problem,please help!
ld: warning: directory not found for option '-
L/Users/lzy/Downloads/IOS88888/LibrariesPlugins/iOS'
Undefined symbols for architecture arm64:
"_saveToGallery", referenced from:
_ScreenshotManager_saveToGallery_m182 in Bulk_Assembly-CSharp_0.o
(maybe youmeant: _ScreenshotManager_saveToGallery_m182)
ld: symbol(s) not found for
architecture arm64 clang: error: linker command failed with exit code 1 (use
-v to see invocation)
One of your library miss the target architecture. Try Simulator or another device with difference cpu.
List all available architecture in your library with cmmand 'lipo -info'
eg:
localhost:~ user$ lipo -info /Applications/iTerm.app/Contents/Frameworks/Sparkle.framework/Sparkle
Architectures in the fat file: /Applications/iTerm.app/Contents/Frameworks/Sparkle.framework/Sparkle are: ppc i386 x86_64
You miss an additional '/' in your library search path. it's a bug in Vuforia that there are '\' instead of '/' in the pathnames. Apple (and linux) treats '\' as escape characters in pathnames.
you have : '/LibrariesPlugins/iOS'
right path: '/Libraries/Plugins/iOS'
Related
When adding the SDK i get this compile error
ld: warning: ignoring file /Path/To/Project/MaxstVideoFramework.framework/MaxstVideoFramework, missing required architecture x86_64 in file /Path/To/Project/MaxstVideoFramework.framework/MaxstVideoFramework (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MasCameraDevice", referenced from:
objc-class-ref in ScanForCouponsViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using swift.
Does any have an idea on how to fix this ?
Thanks
Try in this terminal this code:
lipo -info /path/to/your/framework/binaryfile
Maybe the framework doesn't support architecture x86_64.
Also you should read the SDK documents, maybe you missed some settings just like "Other linker Flags".
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 created a static library (XXX.a) (which has 3 static libraries inside(aaa.a, bbb.a, ccc.a)) and added it into a pre-developed project (someonesProject). When I lipo -info to XXX.a I see the following architectures: armv7, i386, x86_64, arm64
When I try to run this project, I receive an error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_aaa", referenced from:
objc-class-ref in XXX.a(XXX.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I remove arm64 from the valid-architectures (arm64, armv7 armv7s) of the project (someonesProject), then I can run the app.
How can I fix this issue, I want to make this project work without removing arm64?
I really need help.
Thanks
E.
All your static libraries have to be compatible with arm64 if you want to compile your project with this architecture.
So I guess at least one of aaa.a, bbb.a and ccc.a is not compatible with arm64.
I had this question going on, but now I am a little further:
I added this framework to my project:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AdSupport.framework
Now this works fine if I run the app on any device, however this framework is just for the architectures armv7, armv7s and arm64
When running the app on the simulator, the build fails because the architecture i386 is missing. This is included in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AdSupport.framework
How can I achieve that all architectures can be used? I played a lot with the build-settings but nothing worked so far!
error report:
ld: warning: ignoring file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport, missing required architecture i386 in file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks a lot!
Go to the Project Target.and make architecture like below image.
/Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport is missing an i386 slice; I suspect that it was likely built for arm and not intel. It looks like that framework is external to your project, so I suggest you rebuild it for the simulator.
You can check the current architectures of the framework by running file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport
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.