[]在 ios xcode接入微信开放平台分享sdk编译出错

在 ios xcode接入微信开放平台分享sdk,编译出错,报 clang: error: linker command failed with exit code 1 (use -v to see invocation),单独 一个xcode项目,同样接入没有报错
已邀请:

Aar0n

赞同来自:

添加库的路径之类的没配置好这个是xcode相关知识了

bepa_wang

赞同来自:

我新建立一个 项目 ,一样的 配置 ,编译就没有问题 ,用 layabox ide构建的项目,同样加入微信第三方,编译 Apple Mach-O Linker Error  clang: error: linker command failed with exit code 1 (use -v to see invocation)
下面是编译环境参数 
 
Ld /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Products/Debug-iphonesimulator/ykmj.app/ykmj normal x86_64

    cd /Users/wxh/Desktop/layabox/ios/ykmj

    export IPHONEOS_DEPLOYMENT_TARGET=7.0

    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/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/iPhoneSimulator11.1.sdk -L/Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Products/Debug-iphonesimulator -L../LayaRuntime-iOS/libs -L/Users/wxh/Desktop/layabox/ios/ykmj/ykmj/WechtSDK1.8.2_NoPay -F/Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Products/Debug-iphonesimulator -filelist /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Intermediates.noindex/ykmj.build/Debug-iphonesimulator/ykmj.build/Objects-normal/x86_64/ykmj.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Intermediates.noindex/ykmj.build/Debug-iphonesimulator/ykmj.build/Objects-normal/x86_64/ykmj_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -lconch -lJavaScriptCore -lbmalloc -Objc -ljpeg -all_load -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Intermediates.noindex/ykmj.build/Debug-iphonesimulator/ykmj.build/ykmj.app.xcent -framework CFNetwork -lc++.1 -lz.1 -lWeChatSDK -lsqlite3 -framework CoreTelephony -framework Security -lbz2.1.0 -framework AudioToolbox -framework CoreMotion -framework AdSupport -licucore -framework AVFoundation -weak_framework UIKit -framework GLKit -framework OpenGLES -framework OpenAL -framework SystemConfiguration -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Intermediates.noindex/ykmj.build/Debug-iphonesimulator/ykmj.build/Objects-normal/x86_64/ykmj_dependency_info.dat -o /Users/wxh/Library/Developer/Xcode/DerivedData/ykmj-hkcpwhnxmcoyygagguzfcmsdrryg/Build/Products/Debug-iphonesimulator/ykmj.app/ykmj

 
ld: 70 duplicate symbols for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Showing first 200 warnings only

bepa_wang

赞同来自:

现在出错是因为我在OTHER_LDFLAGS后面按照微信指南添加 -all_load参数 ,去掉这个参数编译正常,但是应用无法打开 ,提示线程 sigabort,请求帮助 
//:configuration = Debug
OTHER_LDFLAGS = -lconch -lJavaScriptCore -lbmalloc -ljpeg -Objc -all_load

188*****346

赞同来自:

跟我这遇到但一样,解决了吗?

188*****346

赞同来自:

在iOS平台下对接微信SDK,微信1.77版本以后需要增加-Objc的参数,微信的官方文档中默认让增加
-Objc -all_load
,但是这样会导致编译报错。
遇到到这种情况可以把参数变成 
-Objc -force_load libWeChatSDK.a

要回复问题请先

商务合作
商务合作