在 Linux 上运行 MFC 程序 [英] Run MFC program on Linux

查看:24
本文介绍了在 Linux 上运行 MFC 程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当大的基于 MFC 的程序.我的任务是让它在 Linux 上运行.我已经解释过,这将需要将程序重写为带有 STL 的直接 C++(更多工作)或 Qt/C++(更少工作).现在有人告诉我,我需要编写包装器以使每个 MFC 类在 Linux 中工作,并使用预处理器指令仅编译 Linux 或 Windows 中需要的内容.我解释说我们的通信断开了,我认为这比从头开始重写整个项目(我不必这样做来转换为 Qt)要多.

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?

推荐答案

如果您不想完全重写,可以尝试针对 Winelib.大多数事情应该可以正常工作,然后由于您有源代码,您可以解决没有的部分.

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.

这篇关于在 Linux 上运行 MFC 程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆