Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run MFC program on Linux

Tags:

c++

stl

qt

mfc

I have a rather large MFC based program. I have been tasked to get it running on Linux. I have explained that this will require a re-write of the program either into straight C++ with STL (more work), or into Qt/C++ (less work). I am now told that I need to write wrappers to get every MFC class working in Linux and use preprocessor directives to only compile what is needed in either Linux or Windows. I explained that we are having a communication disconnect and that I believed this to be more work than rewriting the entire project from scratch (which I would not have to do to convert to Qt).

Any good arguments out there to help explain this issue? Am I wrong?

like image 385
E.Freitas Avatar asked Aug 04 '11 17:08

E.Freitas


People also ask

How do I run MFC?

From the main menu, choose File > New > Project. Enter "MFC" into the search box and then choose MFC App from the result list. Modify the defaults as needed, then press Create to open the MFC Application Wizard. Modify the configuration values as needed, then press Finish.

How do I open MFC in Visual Studio?

From the main menu, choose File > New > Project. Under the Installed templates, choose Visual C++ > MFC/ATL. If you don't see these, use the Visual Studio Installer to add them. Choose MFC Application from the center pane.


1 Answers

If you don't want a full rewrite, you could try compiling against Winelib. Most things should just work and then since you have the source, you can work around the parts that don't.

like image 123
Brendan Long Avatar answered Sep 28 '22 10:09

Brendan Long