Sigh. Yet another C++ reserved word which the cretins who designed C++ added instead of creating something with different syntax that would not conflict with C. :-(

Fortunately, unless you are writing a very advanced and highly sophisticated IMAP application, you probably do not need to include imap4r1.h and do not need to use the LEVELxxxxxx macros defined in it.

So, I would recommend that you just delete the include of imap4r1.h and delete the code that tests for LEVELNAMESPACE.

The c-client.h file should be C++ safe.

On Mon, 10 Mar 2008, Alla Bogolubov wrote:

Mark,

I tried to build my simple test app with a C++ compiler on HP-UX11i and
received the following error:

Error 19: "/home/sambuild/imap-2007/c-client/imap4r1.h", line 71 #
Unexpected
   'namespace'.
     unsigned int namespace :1;    /* server has NAMESPACE (RFC 2342)
*/

Please see the application and the Makefile attached.

An attempt to replace iostd.h with iostream.h and 'using namespace std;'
results in the following compiler error:

Error 24: "GetMail.c", line 258 # '<type name>' expected instead of
   'namespace'.
           if (LEVELNAMESPACE (stream)) puts (" Multiple namespaces
(RFC 2342)
               ^^^^^^^^^^^^^^

Error 187: "GetMail.c", line 258 # Referenced object '<type inserted by
   compiler>' is not a member of struct imap_cap
   ["/home/sambuild/imap-2007/c-client/imap4r1.h", line 59].
           if (LEVELNAMESPACE (stream)) puts (" Multiple namespaces
(RFC 2342)

Is there a known workaround for this problem? Can c-client be used with
C++ application?

Thank you,
Alla


-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to