gpt4 book ai didi

ios - Xcode 项目构建 : Failed

转载 作者:行者123 更新时间:2023-11-28 20:32:04 24 4
gpt4 key购买 nike

我正在开发简单的应用程序,在编写代码时没有错误,但是当我按下构建按钮时,错误发生了。 Build myProject: Failed,xCode 向我显示了两个错误警告。这里是错误信息:

 Ld /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator/Calculator.app/Calculator normal i386
cd "/Users/MacUser/Downloads/Downloads/Desktop/old drop box/calc/Calculator"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv 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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
-L/Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator
-F/Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator
-filelist /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Intermediates/Calculator.build/Debug-iphonesimulator/Calculator.build/Objects-normal/i386/Calculator.LinkFileList
-mmacosx-version-min=10.6 -Xlinker
-objc_abi_version -Xlinker 2
-fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100
-framework UIKit -framework Foundation -framework CoreGraphics
-o /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator/Calculator.app/Calculator

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AxesDrawer", referenced from:
objc-class-ref in AxesView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我找到了一些东西,这是我的 controller.m 代码:​​

#import "AxesView.h"
#import "AxesDrawer.h"

@implementation AxesView


- (void)drawRect:(CGRect)rect
{
CGRect b;
b = self.bounds;
CGPoint aO;
aO = b.origin;
CGFloat pPU;
pPU = b.size.height;

[AxesDrawer drawAxesInRect:(CGRect)b originAtPoint:(CGPoint)aO scale:(CGFloat)pPU];
}
@end

我在 AxesDrawer.h 文件中想到的问题,但我不知道为什么。如果我将导入从 AxesDrawer.h 更改为 AxesDrawer.m(我知道那是错误的但只是为了测试)该项目将在模拟器中构建和工作。有人可以帮我吗?我做错了什么?

最佳答案

AxesDrawer.m 可能不在您的目标中。单击它并使用最右侧的 Utilities 面板并确保它已针对您正在构建的目标进行检查。

关于ios - Xcode 项目构建 : Failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11815952/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com