Re: error: conflicting type
Re: error: conflicting type
- Subject: Re: error: conflicting type
- From: "sujeeshlal" <email@hidden>
- Date: Wed, 29 Jun 2005 16:41:11 +0530
Thanx Cameron and Mark for your valuable information. If Application
services and carbon gives all the functionality I think I can go with that
by excluding X11.
and can you help me some equalent functions of CG such as
XOpenDisplay , DefaultScreenOfDisplay ,DefaultScreen ,XGetImage .
Is there available any quick reference for that.
Also when I try to open XopenDisplay using X11 it returned NULL error . What
might be the reason for that?
thanx in advance
Suje
----- Original Message -----
From: "Cameron Hayne" <email@hidden>
To: "sujeeshlal" <email@hidden>
Cc: <email@hidden>
Sent: Wednesday, June 29, 2005 12:12 AM
Subject: Re: error: conflicting type
> 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