簡體   English   中英

Xcode Apple Mach-O鏈接器錯誤1

[英]Xcode Apple Mach-O Linker Error 1

每當我嘗試構建應用程序重命名我的項目后,我得到一個Apple Mach-O鏈接器錯誤下面是Xcode本身的輸出

Ld /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator/Broadcast!Tests.xctest/Broadcast!Tests normal x86_64
    cd "/Users/joshevans/Desktop/sn app/SwifferApp"
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk
-L/Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator
-F/Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/Developer/Library/Frameworks
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/Developer/Library/Frameworks
-filelist /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Intermediates/Broadcast!.build/Debug-iphonesimulator/Broadcast!Tests.build/Objects-normal/x86_64/Broadcast!Tests.LinkFileList
-Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -bundle_loader /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator/SwifferApp.app/SwifferApp
-Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator
-Xlinker -add_ast_path -Xlinker /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Intermediates/Broadcast!.build/Debug-iphonesimulator/Broadcast!Tests.build/Objects-normal/x86_64/Broadcast_Tests.swiftmodule
-mios-simulator-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Intermediates/Broadcast!.build/Debug-iphonesimulator/Broadcast!Tests.build/Objects-normal/x86_64/Broadcast!Tests_dependency_info.dat
-o /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator/Broadcast!Tests.xctest/Broadcast!Tests ld: file not found: /Users/joshevans/Library/Developer/Xcode/DerivedData/Broadcast!-gbvxmzbukuqqgxcmlipegtnzosze/Build/Products/Debug-iphonesimulator/SwifferApp.app/SwifferApp clang: error: linker command failed with exit code 1 (use -v to see invocation)

感謝您的幫助,因為我是Xcode和快速語言的新手。 玩笑

重命名后,只需轉到您的項目文件(您將看到標簽:常規,功能,信息等)

並在左側列表中選擇YourAppTests

在此輸入圖像描述

你可能會看到這張照片 在此輸入圖像描述

將Host Application設置為您的項目名稱,就是這樣。

我在嘗試實施AdMob廣告時偶爾會遇到Apple Mach-O Linker Error 1 我處理它的方式是首先進入我的應用程序的構建設置並找到“庫搜索路徑”並清除所有搜索路徑。 然后我將AdMob文件夾重新添加到項目中,錯誤消失了。

現在顯然你的情況有點不同了。 就個人而言,我會將文件重命名為以前的名稱。 如果錯誤仍然存​​在,則清除庫搜索路徑。 仍然是一個錯誤? 我在收到錯誤時所做的是創建一個名為I want的新Xcode項目,然后將所有文件復制到新項目中。 這是一個簡單的過程,特別是如果你是一個初學者,它可能不會花太長時間。 我希望這有幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM