Undefined Symbols For Architecture I386: _Objc_Class_$_Skpsmtpmessage", Referenced From: Error

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage, referenced from: error

You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target. Normally Xcode does this for you, but sometimes it loses the plot and you need to add the .m file manually.

To do this:

TargetSettings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run

iOS: Undefined symbols for architecture i386

Make sure that each source file that needs to be linked is part of the Compile Sources section of your target. You can verify this by selecting your project in Navigator pane (as shown in your screenshot) and expanding the section shown here:

Xcode Compile Sources

You can also verify this by selecting the files and viewing their target membership in the Utilities pane in xcode.

Target Membership

Undefined symbols for architecture i386: _OBJC_CLASS_$_ZipException, referenced from: error

The error message says that the undefined symbol is referenced by ZipFile.o, ZipReadStream.o, and ZipWriteStream.o. This implies that you're trying to use the Objective-Zip library in your app.

The undefined symbol is _OBJC_CLASS_$_ZipException. The compiler generates this symbol when it sees the @implemention ZipException directive in a source file.

The Objective-Zip library includes a file named ZipException.m, which contains the @implementation ZipException directive.

The most likely explanation is that you simply haven't included ZipException.m in your target. Check that you have done so. If you don't know how, look at this answer.

Another possible explanation is that you have modified the ZipException.m file, perhaps accidentally, in a way that removes the @implementation ZipException directive or hides it from the compiler. Check that you have not modified the file, and that it contains the @implementation ZipException directive.



Related Topics



Leave a reply



Submit