如何解决错误“链接器命令失败,退出代码1(使用-v查看调用)”在Xcode 10 beta中? [英] How to solve an error "linker command failed with exit code 1 (use -v to see invocation) "in Xcode 10 beta?

查看:1432
本文介绍了如何解决错误“链接器命令失败,退出代码1(使用-v查看调用)”在Xcode 10 beta中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建时失败。错误说 / clang:-1:链接器命令失败,退出代码为1(使用-v查看调用)。我在我的项目中添加了一个插件unity.Is它与插件有关。我认为这是

While taking builds it failed.Error saying "/clang:-1: linker command failed with exit code 1 (use -v to see invocation)" .I added a plugin to my project in unity.Is it something to do with the plugin.I considered this Link for solution.Here I cant find anything called Pods.Using Unity2018.2.1f1 and Xcode 10 beta.I will attach an image below of my project view in xcode.

Ld /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos/BLEDevice.app/BLEDevice normal arm64 (in target: Unity-iPhone)
cd /Users/ar/Desktop/Mobile\ builds/BLEplugin
export IPHONEOS_DEPLOYMENT_TARGET=11.3
/Users/ar/Documents/Xcode10_beta/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Users/ar/Documents/Xcode10_beta/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos -L/Users/ar/Desktop/Mobile\ builds/BLEplugin -L/Users/ar/Desktop/Mobile\ builds/BLEplugin/Libraries -F/Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos -filelist /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice.LinkFileList -Xlinker -map -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/BLEDevice-LinkMap-normal-arm64.txt -miphoneos-version-min=11.3 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice_lto.o -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -framework Security -framework MediaToolbox -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lil2cpp -weak_framework Metal -Xlinker -dependency_info -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice_dependency_info.dat -o /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos/BLEDevice.app/BLEDevice

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CBMutableService", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBMutableCharacteristic", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBAdvertisementDataManufacturerDataKey", referenced from:
      -[UnityBluetoothLE centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in UnityBluetoothLE.o
  "_CBAdvertisementDataServiceUUIDsKey", referenced from:
      -[UnityBluetoothLE startAdvertising] in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBAdvertisementDataLocalNameKey", referenced from:
      -[UnityBluetoothLE startAdvertising] in UnityBluetoothLE.o
      -[UnityBluetoothLE centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBPeripheralManager", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      __iOSBluetoothLEScanForPeripheralsWithServices in UnityBluetoothLE.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


推荐答案

我从未使用过Unity,但是您的错误明确指出Unity蓝牙LE库中的几个符号未定义为平台arm64。这意味着它不包含arm64的正确机器代码,这是iPhone使用的平台。这意味着您需要将库替换为另一个库。我在Unity资源商店中找到了几个蓝牙文件库。祝你好运。

I haven't ever used Unity, but your error specifically says that several symbols in your Unity Bluetooth LE Library are undefined for platform arm64. This means that it does not contain the right machine code for arm64, which is the platform used by iPhones. This means you need to replace the library with another one. I found several bluetooth le libraries in the Unity Asset Store. Good luck with using any of those.

这篇关于如何解决错误“链接器命令失败,退出代码1(使用-v查看调用)”在Xcode 10 beta中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆