MFC and Mac

Apr 24, 2009 at 6:03pm
Hi,

I want to convert a C++ program from windows to Mac. I have solved now many bugs, but I still need to kill one more. The code needs MFC-headerfiles.. For as far as I know, I don't have them, or I don't know the right names. I have searched on google, but I could not find it. This is the piece of code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxcview.h>
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include <afxsock.h>		// MFC socket extensions

#include <afxole.h>			// Drag & Drop Support
#include <afxmt.h>			// CriticalSection support

#include <stdio.h>
#include <string.h>

#include <mmsystem.h> 

Only these 2 are giving no errors:
1
2
#include <stdio.h>
#include <string.h> 


EDIT: Eclipse or XCode gives the error while compiling..

Thanks alot!
Last edited on Apr 24, 2009 at 6:08pm
Apr 24, 2009 at 6:56pm
MFC stands for Microsoft Foundation Classes -- a completely non-portable (OS-specific) library. You must figure out how to change the code so that they do not require these headers if you want to port the code to OS X.

Some of the MFC can be replaced with cross-platform UI toolkits such as wxWidgets, GTK+ or Qt. Some of it will have to be changed to use OS-specific hooks to get the same functionality.

Good luck. I don't envy your task.
Apr 25, 2009 at 12:06pm
OK.
Thanx for your help! Is there anyone, who wants to help me with that? I am just a beginning C programmer..

Many thanks!
Topic archived. No new replies allowed.