On Tue, 5 Apr 2005 00:39:01 -0700, "KwiGibo"
<Kw*****@discussions.microsoft.com> wrote:
Back in MFC 4 days (I think), MS did have some support for building
MFC apps for the Mac. However, as far as I know, it's long been
abandoned. The best plan may be to isolate as much platform specific
code so your common C++ code is simply re-compiled for different
platforms, and if you want to try to keep common code for the UI
aspects, try a toolkit such as: http://www.wxwindows.org/
Dave
Thanks Dave for you prompt reply and also directing my towards wxWidgets. I
heard that a while ago MS released "Visual C for Mac" which was a win32 app
and compiled mac binaries. Is there a compiler currently available that will
do this? Or will I need to invest in a product for Mac?
They did have one. I wasted a lot of money for it several years ago.
It cross-compiled for 68K & PowerPC on MacOS 7.1-8, and made simple
Windows code and resources work (somewhat) on Macs. There was a lot of
additional work required, though.
Microsoft used it for the Mac version of MS Office, and they continued
to upgrade the cross-compiler for internal use for a while after they
discontinued selling or supporting it. I doubt if they're still doing
it; it was pretty crappy.
Porting the GUI was OK, but resources were not stored as native Mac
resource. My ISO standard C modules compiled fine, but they are a
small percentage of my code.
Filesystem and database access essentially had to be done natively,
and there were many unsupported Win32 functions that had to be worked
around or coded natively. My code began to fill up with #ifdef MAC,
and I had to write several Mac-only modules.
Debugging was a nightmare. Mac OS did not have protected memory, so a
plain old application crash would usually bring the whole machine
down, like Windows 3.x. Rebooting took forever, even on a fast
machine.
I don't know a lot about other ways to port to Mac, but I've heard
decent things about WINE for porting to Linux, and it may work for Mac
OS X too.
--
Phillip Crews aka Severian
Microsoft MVP, Windows SDK
Posting email address is real