简体   繁体   English

xcode 6中的Apple Mach-O链接器错误

[英]Apple Mach-O Linker Error in xcode 6

I was adding new UITableView delegate method in my code and suddenly i got one error while compiling like this .My Xcode version is Version 6.1 (6A1046a) 我在我的代码中添加了新的UITableView委托方法,突然我在编译时出现了一个错误。我的Xcode版本是Version 6.1(6A1046a)

Ld /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos/MedTests.xctest/MedTests normal arm64
    cd /Users/apple/Documents/med
    export IPHONEOS_DEPLOYMENT_TARGET=8.1
    export PATH="/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -bundle -isysroot /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos -F/Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos -F/Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/Developer/Library/Frameworks -filelist /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Intermediates/Med.build/Debug-iphoneos/MedTests.build/Objects-normal/arm64/MedTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -bundle_loader /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos/Med.app/Med -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.1 -Xlinker -dependency_info -Xlinker /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Intermediates/Med.build/Debug-iphoneos/MedTests.build/Objects-normal/arm64/MedTests_dependency_info.dat -o /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos/MedTests.xctest/MedTests

ld: file not found: /Users/apple/Library/Developer/Xcode/DerivedData/Med-emhoezxvdfnzwvfvktteeafyndtq/Build/Products/Debug-iphoneos/Med.app/Med
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have tried my backup versions too but none of them are working now,please help me 我也试过我的备份版本,但现在都没有,请帮助我

I am also had these kind of issue. 我也遇到过这类问题。 Then I create the new schema. 然后我创建新架构。 Then it worked. 然后它奏效了。 Just try. 你试一试。

Change the schema or create new schema 更改架构或创建新架构 在此输入图像描述

Was completely stuck with this too. 完全坚持这个。 Deleting the derived data did not help, nor cleaning the build folder (Product -> option-key -> clean build folder), nor deleting stuff in the Organizer window. 删除派生数据没有帮助,也没有清除构建文件夹(Product - > option-key - > clean build folder),也没有删除Organizer窗口中的内容。 In the end I decided to delete the "myproductTests" target (that I never even looked into). 最后我决定删除“myproductTests”目标(我从未调查过)。 That worked. 那很有效。 (Xcode 6.1.1 and 6.3) (Xcode 6.1.1和6.3)

Cleaning and running the project again can also work. 再次清洁和运行项目也可以。

1) Product -> Clean 2) Product -> Run 1)产品 - >清洁2)产品 - >运行

No clue why, but it worked. 不知道为什么,但它奏效了。

转到项目 - >构建设置 - >测试 - >测试主机删除测试主机中的路径。

Deleting your Derived data folder might also help 删除Derived数据文件夹也可能有所帮助

You'll find it in 你会发现它

Window -> Organizer -> Projects (Then select your project) 窗口 - >管理器 - >项目(然后选择您的项目)

指的是视图控制器的看法,当我正好遇到“苹果Mach-O的连接错误” _view代替self.view

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM