objective-c - 运行奇怪的错误运行 objective-c 代码

我的项目没有可见错误,但是当我尝试运行时,出现以下错误

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

我在ViewController.m中使用ContactScreen类

我尝试通过@class ContactScree和#import "ContactScreen.h"
在我的ViewController中,我将其用作[ContactScreen myMethod];当我注释掉这一行时,它工作正常,但现在却给出了编译时错误:(
昨天天气很好

这是我的代码
#import "ViewController.h"


#import "ConcreteScreen.h"
@interface ViewController ()

@end

@implementation ViewController




-(IBAction)btnContactPress:(id)sender{
   NSLog(@"Contact Screen");

    ConcreteScreen *coontact = [[ConcreteScreen alloc]init];

}

最佳答案

您混淆了ConcreteScreenContactScreen,编译器告诉您它不知道ConcreteScreen

https://stackoverflow.com/questions/11039014/

相关文章:

f# - 编译错误提示值不是函数

c# - 通用 - 编译器警告 CS0693 或错误

node.js - 编译 Node 给出 “No-old-style-declaration”标志错

android - 从现有代码创建新项目

c++ - C++模板泛型(模板参数列表)

compiler-errors - 为什么 'dsgaudiko'有效的PHP?

boost - 使用复合键从 multi_index_container 中删除每个键的元素

c# - 从LINQ查询返回匿名类型?

winforms - C++ CLI KeyDown::raise 错误 error C3767 候

c# - 'System.Data.Objects.ObjectContext'不包含带有0个参数的