ld: 找不到 -lPods-Unity-iPhone 的库
Posted
技术标签:
【中文标题】ld: 找不到 -lPods-Unity-iPhone 的库【英文标题】:ld: library not found for -lPods-Unity-iPhone 【发布时间】:2017-01-30 21:44:40 【问题描述】:将 Unity 项目编译到 ios 并收到错误。位码已禁用。
Ld /Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Products/ReleaseForRunning-iphoneos/mygamename.app/mygamename normal armv7
cd /Users/kisuroso/Desktop/lc4
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Products/ReleaseForRunning-iphoneos -L/Users/kisuroso/Desktop/lc4 -L/Users/kisuroso/Desktop/lc4/Libraries -L/Users/kisuroso/Desktop/lc4/Libraries/Plugins/iOS -F/Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Products/ReleaseForRunning-iphoneos -F/Users/kisuroso/Desktop/lc4/../../myprojectname/Assets/Editor/Vungle/VungleSDK -F/Users/kisuroso/Desktop/lc4/Frameworks/Plugins/iOS -F/Users/kisuroso/Desktop/lc4/Frameworks -F/Users/kisuroso/Desktop/lc4/Libraries -filelist /Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mygamename.LinkFileList -Xlinker -map -Xlinker /Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/mygamename-LinkMap-normal-armv7.txt -miphoneos-version-min=6.0 -dead_strip -weak_framework CoreMotion -weak-lSystem -ObjC -ObjC -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -lsqlite3 -lz -framework SystemConfiguration -framework CoreData -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 -lAdapterUnity -framework QuartzCore -framework UIKit -liconv.2 -framework AdColony -lGoogleAnalyticsServices -framework StoreKit -weak_framework Metal -framework CoreTelephony -framework EventKit -framework UnityAds -framework EventKitUI -framework MessageUI -lz.1.2.5 -weak_framework Social -weak_framework Webkit -lPods-Unity-iPhone -framework GoogleMobileAds -framework GLKit -framework javascriptCore -framework MobileCoreServices -framework SafariServices -framework WebKit -framework VungleSDK -weak_framework AdSupport -lsqlite3 -lz.1.1.3 -Xlinker -dependency_info -Xlinker /Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mygamename_dependency_info.dat -o /Users/kisuroso/Library/Developer/Xcode/DerivedData/Unity-iPhone-bjemlyxqozcusqbeibtfjsvjnkcv/Build/Products/ReleaseForRunning-iphoneos/mygamename.app/mygamename
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
有什么想法吗?谢谢
【问题讨论】:
【参考方案1】:在主项目中删除了 libPods-Unity-iPhone.a,现在可以使用了。
【讨论】:
【参考方案2】:-
在项目中移动 pods 文件夹,打开 Pods.xcodeproj
产品菜单/方案/点击管理方案菜单/设置方案
产品菜单/点击构建菜单
创建了 Pods-Unity-iPhone.a
【讨论】:
以上是关于ld: 找不到 -lPods-Unity-iPhone 的库的主要内容,如果未能解决你的问题,请参考以下文章