Re: bringing windows c++ code to Macintosh
Re: bringing windows c++ code to Macintosh
- Subject: Re: bringing windows c++ code to Macintosh
- From: Ken Thomases <email@hidden>
- Date: Wed, 10 Sep 2008 04:34:10 -0500
As others have pointed out, a big part of your problem is that you're
trying to compile plain C (or Objective-C) files that contain C++
code. You need to put C++ code into .cpp or .mm files. (It is
possible to tell Xcode to treat a file as C++ or Objective-C++
regardless of its extension, but you'll just confuse yourself if you
go that route.)
Beyond that...
On Sep 10, 2008, at 1:33 AM, M Pulis wrote:
(1) How should fields declared as HGLOBAL be declared as on
Macintosh? I have tried "handle" but Xcode complains (why???). Tried
uint32, which allowed compilation to continue, BUT, it feels wrong.
The short answer is that you don't declare those fields as anything on
the Mac. If you don't understand that porting to the Mac means
totally revamping or replacing any code which currently uses Win32-
specific data types, then you're not going to get very far.
You need to examine what those HGLOBAL fields are being used for
(their semantics, not their syntax), research what the appropriate
alternative would be to achieve similar semantics in the Mac API(s)
that you've chosen, and then rework the code in terms of those new Mac
APIs. It is never going to be as simple as just declaring the same
fields with different type. You may not need those fields, you may
need different fields, you may need more fields or fewer -- it
requires redesign.
Regards,
Ken
_______________________________________________
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