xu-li / cordova-plugin-wechat

A cordova plugin, a JS version of Wechat SDK
1.22k stars 509 forks source link

build ios / run ios 报错 #93

Closed eddiclin closed 9 years ago

eddiclin commented 9 years ago

参照demo,最后运行 ionic run ios,报错了。(在Android上可以正常使用) 网络上也有其他小伙伴有类似的报错:http://bbs.csdn.net/topics/391839063 原先发现问题是在本来的项目里,但为了屏蔽其他干扰因素,使用了demo也有同样的问题。 开发环境: Cordova CLI: 5.3.3 Gulp version: CLI version 3.9.0 Gulp local: Ionic CLI Version: 1.7.7 Ionic App Lib Version: 0.6.3 ios-deploy version: 1.7.0 ios-sim version: Not installed OS: Mac OS X El Capitan Node Version: v0.12.7 Xcode version: 6.4.0

错误信息如下:

Ld build/emulator/Wechat\ DEMO\ for\ cordova.plugin.wechat.app/Wechat\ DEMO\ for\ cordova.plugin.wechat normal i386 cd /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios export IPHONEOS_DEPLOYMENT_TARGET=6.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/emulator -L/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat\ DEMO\ for\ cordova.plugin.wechat/Plugins/xu.li.cordova.wechat -F/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/emulator -filelist /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/Wechat\ DEMO\ for\ cordova.plugin.wechat.build/Debug-iphonesimulator/Wechat\ DEMO\ for\ cordova.plugin.wechat.build/Objects-normal/i386/Wechat\ DEMO\ for\ cordova.plugin.wechat.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework AssetsLibrary /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/emulator/libCordova.a -framework CoreGraphics -framework MobileCoreServices -lWeChatSDK -lz -lsqlite3.0 -framework CoreTelephony -framework SystemConfiguration -framework Security -lstdc++.6 -Xlinker -dependency_info -Xlinker /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/Wechat\ DEMO\ for\ cordova.plugin.wechat.build/Debug-iphonesimulator/Wechat\ DEMO\ for\ cordova.plugin.wechat.build/Objects-normal/i386/Wechat\ DEMO\ for\ cordova.plugin.wechat_dependency_info.dat -o /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/emulator/Wechat\ DEMO\ for\ cordova.plugin.wechat.app/Wechat\ DEMO\ for\ cordova.plugin.wechat duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEnv.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEnv.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTA.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTA.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAConfig.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAConfig.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTADataConfigHolder.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTADataConfigHolder.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTADispatcher.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTADispatcher.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAHelper.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAHelper.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAReachability.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAReachability.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAPasteboard.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAPasteboard.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAStore.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAStore.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(OpenUDID.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(OpenUDID.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAKeyChain.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAKeyChain.o) duplicate symbol _llvm.cmdline in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTATestSpeed.o) duplicate symbol _llvm.embedded.module in: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTAEvent.o) /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/xu.li.cordova.wechat/libWeChatSDK.a(MTATestSpeed.o) ld: 24 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

\ BUILD FAILED **

The following build commands failed: Ld build/emulator/Wechat\ DEMO\ for\ cordova.plugin.wechat.app/Wechat\ DEMO\ for\ cordova.plugin.wechat normal i386 (1 failure) Error code 65 for command: xcodebuild with args: -xcconfig,/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/cordova/build-debug.xcconfig,-project,Wechat DEMO for cordova.plugin.wechat.xcodeproj,ARCHS=i386,-target,Wechat DEMO for cordova.plugin.wechat,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/build/sharedpch ERROR running one or more of the platforms: Error: /Users/dingxi/eddic/cordova-plugin-wechat-example-master/ionic/platforms/ios/cordova/run: Command failed with exit code 2 You may not have the required environment or OS to run this project

eddiclin commented 9 years ago

升级Xcode为7.1后,问题解决