问题描述
- iOS新建的项目,一句代码没写,使用 Cocoapod导入融云以后,编译都过不了,该怎么解决呢?
-
Ld /Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Products/Debug-iphonesimulator/MyChat.app/MyChat normal x86_64
cd /Users/mudy/Desktop/MyChat
export IPHONEOS_DEPLOYMENT_TARGET=8.4
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Products/Debug-iphonesimulator -L/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable -F/Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Products/Debug-iphonesimulator -F/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable -filelist /Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Intermediates/MyChat.build/Debug-iphonesimulator/MyChat.build/Objects-normal/x86_64/MyChat.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lc++ -lc++abi -lopencore-amrnb -lsqlite3 -lstdc++ -lxml2 -lz -framework AVFoundation -framework AssetsLibrary -framework AudioToolbox -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreTelephony -framework CoreVideo -framework ImageIO -framework MapKit -framework OpenGLES -framework QuartzCore -framework RongIMKit -framework RongIMLib -framework SystemConfiguration -framework UIKit -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Intermediates/MyChat.build/Debug-iphonesimulator/MyChat.build/Objects-normal/x86_64/MyChat.swiftmodule -mios-simulator-version-min=8.4 -lPods -Xlinker -dependency_info -Xlinker /Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Intermediates/MyChat.build/Debug-iphonesimulator/MyChat.build/Objects-normal/x86_64/MyChat_dependency_info.dat -o /Users/mudy/Library/Developer/Xcode/DerivedData/MyChat-eklapihtyzzzagfohpydmuedmhfu/Build/Products/Debug-iphonesimulator/MyChat.app/MyChatduplicate symbol _llvm.cmdline in:
/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable/libopencore-amrnb.a(wrapper.o)
/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable/libopencore-amrnb.a(agc.o)
duplicate symbol _llvm.embedded.module in:
/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable/libopencore-amrnb.a(wrapper.o)
/Users/mudy/Desktop/MyChat/Pods/RongCloudIMKit/Rong_Cloud_iOS_SDK_v2_3_2_stable/libopencore-amrnb.a(agc.o)
ld: 288 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决方案
你应该是在模拟器上运行的吧,你使用的这个第三方SDK的静态库,就是.a后缀的文件,不支持模拟器指令集,因为模拟器是电脑的CPU, x86_64构架
再一个你看看你工程支持的ios版本和你运行的设备是不是不匹配,运行的设备的ios版本一定要高于或等于工程支持的ios版本,
大概应该就是这两个问题。