【问题标题】:Xcode linker failing when building Unity3D iPhone project构建 Unity3D iPhone 项目时 Xcode 链接器失败
【发布时间】:2017-09-24 19:55:07
【问题描述】:

Unity 能够构建 Xcode 项目,但是当我将项目构建到我的 iPhone 时,它​​会抛出 50 个警告(我听说这对 Unity 项目来说很好)并且它在链接器处失败。

Ld /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/Dribble.app/Dribble normal arm64
    cd /Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0
    export IPHONEOS_DEPLOYMENT_TARGET=11.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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk -L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos -L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/GTMSessionFetcher -L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/GoogleToolboxForMac -L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/nanopb -L/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0 -L/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Libraries -L/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Libraries/Plugins/iOS/Firebase -F/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos -F/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Pods/FirebaseAnalytics/Frameworks -F/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Pods/FirebaseAuth/Frameworks -F/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Pods/FirebaseCore/Frameworks -F/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/Pods/FirebaseInstanceID/Frameworks -F/Users/collinnapier/Documents/Unity/Dribble/Builds/0.1.0/UnityAds -filelist /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/Dribble.LinkFileList -Xlinker -map -Xlinker /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Dribble-LinkMap-normal-arm64.txt -miphoneos-version-min=11.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/Dribble_lto.o -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -ObjC -lGTMSessionFetcher -lGoogleToolboxForMac -lc++ -lnanopb -lsqlite3 -lz -framework FirebaseAnalytics -framework FirebaseAuth -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework FirebaseNanoPB -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework CoreMotion -weak-lSystem -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 -lApp -lAuth -framework StoreKit -weak_framework Metal -framework UnityAds -weak_framework AdSupport -framework CoreTelephony -lPods-Unity-iPhone -Xlinker -dependency_info -Xlinker /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/Dribble_dependency_info.dat -o /Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/Dribble.app/Dribble

ld: warning: directory not found for option '-L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/collinnapier/Library/Developer/Xcode/DerivedData/Unity-iPhone-bradioenzitmtgewmwevmohjyqur/Build/Products/ReleaseForRunning-iphoneos/nanopb'
ld: library not found for -lGTMSessionFetcher
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

    标签: ios iphone xcode unity3d


    【解决方案1】:

    似乎图书馆的参考资料搞砸了。尝试删除引用并再次添加。有关如何执行此操作和其他建议的更多信息,请参阅这些类似问题。

    Error "library not found for"

    XCode linker error : library not found for -lAdMobDevice

    【讨论】:

      【解决方案2】:

      在“Unity --> Edit --> Project Settings --> Player --> iOS Settings --> Other Settings --> Target minimum iOS Version”中将最低iOS版本更新为较新版本(在我的情况下为12.0 ) 并修复 Unity 版本“Unity Dashboard --> Cloud Build --> Config --> in iOS profile --> Basic Info Unity version”(在我的情况下为 2021.2.0b13)。 这解决了我的问题。

      【讨论】:

        猜你喜欢
        • 2019-04-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-09
        • 2019-03-07
        • 1970-01-01
        • 2013-11-01
        • 1970-01-01
        相关资源
        最近更新 更多