繁体   English   中英

Xcode项目中的链接器错误

[英]linker error in Xcode project

我收到以下链接器错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Message", referenced from:
      objc-class-ref in DetailsViewController.o
     (maybe you meant: _OBJC_CLASS_$_Messages)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

我该如何删除? 我签入了DetailsViewController.m,那里没有任何Message类

更新:

在此之前,我有一个警告:(这是由于我将ShareKit添加到项目中引起的)

objc[59714]: Class Message is implemented in both /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/PrivateFrameworks/MIME.framework/MIME and /Users/aditya15417/Library/Application Support/iPhone Simulator/4.3.2/Applications/4EFD7570-AD87-48E8-8606-1D5633F65AD9/CTest.app/CTest. One of the two will be used. Which one is undefined.

正如SO的一个人所建议的那样,我需要在Message类的后面加上其他前缀,因此我在类中的每个地方都将Message的类名更改为CVMessage(基本上每当我看到Messsage时都将其替换为CVMessage),然后我得到这个错误

检查DetailsViewController是否在目标的“ Compile Sources中。

运行静态分析器,然后查看该文件中是否有警告。

您正在那里引用某个地方的Messages,即使您所做的只是利用应该返回Message类的某个地方的调用...

您的项目中的某处必须有一个Message类,检查并查看目标是否正在编译该类。

暂无
暂无

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

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