LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to convert mfc libraries in linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-convert-mfc-libraries-in-linux-4175550934/)

sryzdn 08-17-2015 01:13 AM

how to convert mfc libraries in linux
 
Hi,

I have written an application in windows using mfc (microsoft foundation class) c++. What could be the solution it to migrate to linux?

astrogeek 08-17-2015 01:15 AM

Rewrite it without using mfc.

sryzdn 08-17-2015 01:17 AM

Quote:

Originally Posted by astrogeek (Post 5406789)
Rewrite it without using mfc.

The whole program structure is based on mfc libraries, isn't there really any other alternatives?

astrogeek 08-17-2015 01:51 AM

To be honest it has been a long time since I worked with mfcs (20 years+), so maybe someone else can offer another avenue. But I am not aware of any "conversion" method other than writing new classes with the same interface and/or function provided by the mfcs.

The mfcs are very non-portable as I recall, largely because they bind tightly to Window$ core/kernel types and features.

*** Added comment: I just did a quick search and did not see any other path prominently mentioned. It will likely be a lot of work and involve more than a simple one-to-one code rewrite for a large application, but is of course doable.

jpollard 08-17-2015 02:56 AM

Quote:

Originally Posted by sryzdn (Post 5406791)
The whole program structure is based on mfc libraries, isn't there really any other alternatives?

MFC was specifically designed to not be portable.

The only place you will find something similar would be buried in the wine project. But I have no idea how hard it would be to extract.

You might find some help from

https://www.winehq.org/docs/winelib-guide/index

note the legal warnings - a lot of MFC is composed of macros... which could present legal issues.

and the project at: https://www.winehq.org/


All times are GMT -5. The time now is 10:15 AM.