简体   繁体   中英

linker error in Xcode project

I am getting the following linker error:

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

How do I remove this? I checked in my DetailsViewController.m and I don't have any Message class anywhere in there

UPDATE:

Before this I had a warning: (this was caused because I added ShareKit into my project)

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.

As suggested by one guy from SO, I need to append the Message class with some other prefix.Therefore I changed the class name of Message to CVMessage everywhere in my class (basically whenever I see Messsage I'd replace it with CVMessage) and then I got this error

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

Run the static analyzer, and see if there are warnings in that file.

You are referencing Messages somewhere in there, even if all you are doing is making use of a call somewhere that's supposed to return a Message class...

You must have a Message class somewhere in your project, check and see if that is being compiled by your target.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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