Re: error: conflicting type
Re: error: conflicting type
- Subject: Re: error: conflicting type
- From: Cameron Hayne <email@hidden>
- Date: Tue, 28 Jun 2005 14:42:57 -0400
On 28-Jun-05, at 8:16 AM, sujeeshlal wrote:
I am newable in Mac Os. I have tried to port my Linux application
to MAC using XCode. In my project
I used some Xlib functions . But when I tried to include
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
to my existing file which also contains
#include <X11/Xlib.h>
it shows some errors like
error:conflicting type for 'struct Cursor'
error: previous declaration as 'typedef XID Cursor'
It is somewhat unusual to use OS X specific code like Carbon and
ApplicationServices in a "port". You should be able to get the
program working with relatively small changes given that it will
retain its X11 user-interface.
But if you really need to have the headers included all in the same
file, you could use the standard trick of #define-ing one of the
conflicting symbols to be something different.
E.g.:
#define Cursor X11_Cursor
#include <X11/X11.h>
#undef Cursor
and then use "X11_Cursor" in your code if you need the X11 Cursor type.
--
Cameron Hayne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden