LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2015, 01:13 AM   #1
sryzdn
Member
 
Registered: Feb 2013
Posts: 274

Rep: Reputation: 9
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?
 
Old 08-17-2015, 01:15 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Rewrite it without using mfc.
 
Old 08-17-2015, 01:17 AM   #3
sryzdn
Member
 
Registered: Feb 2013
Posts: 274

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by astrogeek View Post
Rewrite it without using mfc.
The whole program structure is based on mfc libraries, isn't there really any other alternatives?
 
Old 08-17-2015, 01:51 AM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
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.

Last edited by astrogeek; 08-17-2015 at 02:20 AM.
 
Old 08-17-2015, 02:56 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by sryzdn View Post
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/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux compatibility of Brother MFC Printers markw10 Linux - Hardware 6 08-30-2012 03:04 AM
MFC and Linux Bram van Kampen Linux - Newbie 11 11-15-2009 08:59 AM
Compiling/Converting MFC to Linux PhaseSpace Linux - Software 4 02-02-2005 01:02 PM
Porting from VC++: MFC Support on Linux sheenak Programming 2 01-13-2005 05:14 AM
Does my Brother MFC-5100c work under linux? mikeylikesit! Linux - Hardware 2 10-08-2002 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration