简体   繁体   中英

Importing Pantomime for sending email!

I want to send an email from Cocoa in an asynchronous manner. I have downloaded Pantomime source code and compiled it, then got the framework from the build folder. I have added the Pantomime framework in my app. Now my problem is when I add the import satement like:

#import <Pantomime/Pantomime.h>

I got these build errors:

error: cannot find protocol declaration for 'RunLoopEvents'

error: syntax error before 'RunLoopEventType'

fatal error: method definition not in @implementation context

All these errors are found in CWService.h, which is one of the files in the Pantomime framework header.

Can anyone suggest how can I import the header without build errors?

Maybe it doesn't know that you are on Mac OS X. I just looked into an old project and there I used

#define MACOSX
#include <Pantomime/Pantomime.h>

to include the Pantomime header. So you could try to #define MACOSX before importing the Pantomime header to see if this solves your problem.

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