[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Win32 -> MAC code conversion

Hi Folks,
we have a little bit complex Win32 application written in C++ using MFC. We consider to put some effort to have the application runable on MACs. By now we know almost nothing about MACs, but in MFC includes there are lines like

#ifdef MAC

so there is probably a possibility to use it on MACs.

What we'd like to know - is there any Win32 -> MAC application convertor or
we have to rewrite the whole application. If there is such a convertor, where it can
be found ?

1 Solution
MS used to provide libraries that allowed MFC code to be compiled and run on the mac as well. (Subject to many restrictions, i.e. there are lots of things on windows that are not available on the Mac and vice versa, but most programs could be made to work on both.)  The problem was that the two OSs have very different architectures and the amount "patching" that MS had to do in order to make a Mac appear to work like windows was enourmous, so the result was that the programs worked sort of slowly, had great overhead, and were somewhat buggy.  (I think it was a pretty amazing acheivement all the same.)  However, to the best of my knowledge they abandoned this approach years ago, like when windows 95 was released.  So I don't think that compiling the same code on both platforms is realistically possible now.

However, I don't think I would recommend that anyways--the results weren't good.  Instead try to clearly seperate all you user interface code from the application's processing code.  Place them in seperate files etc.  Then create one version of the user interface for the mac and one for windows, the two can share the same processing code.  This will yield much better results on both platforms.
For the user interface you might consider using a portable class library like wxWindows, http://www.wxwindows.org/
But that won't help you porting the current application.
if u use an IDE "codewarrior" on MAC, it has built in support for MFC and you can compile all the windows MFC code as it is.
hope this helps.
izi13Author Commented:
Thanx all of you.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now