Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can MFC application run on operating system other than windows?

Tags:

mfc

I need to create a dialog based GUI using VC++/MFC. I am sure it will work with windows OS, but will it work on Linux/Unix or other OS other than windows? Is QT an alternative good option?

like image 366
Polygotte Avatar asked Sep 09 '10 10:09

Polygotte


2 Answers

An application written using MFC classes would most probably not work on Linux or Unix, sourcecode-wise. You would have to reimplement most of MFC using X Windows. Qt is a good alternative when the sourcecode has to be used on multiple platforms, e.g. Windows and Linux.

If you just want to run a compiled .exe on Linux, there's the Wine project on Linux that lets you run the application using a "translation layer" that runs on Linux.

like image 92
vividos Avatar answered Oct 18 '22 09:10

vividos


No, MFC is for Windows development. I have some vague memory of there being a version of MFC for Solaris or something about 12-15 years ago, but I can't find any information about that now. There is however two other commercial solutions that are supposed to be useful for porting MFC apps to unix:

Mainsoft for UNIX and Linux
Bristol Wind/U (I don't know if this exists anymore though since Bristol was bought by HP a few years ago).

All in all though, if you need an app to run on both Windows and Unix/Linux I'd suggest looking at QT since that's what usually gets recommended for that.

like image 23
Hans Olsson Avatar answered Oct 18 '22 07:10

Hans Olsson