问题描述
对于使用MFC和WinAPI编写的C ++编写的复杂应用程序,有一个大的现有代码库,需要将其移植到Mac OS X.理想的解决方案是在不同平台之间拥有尽可能多的代码,特别是代码例如业务逻辑。 GUI可能不同,这取决于跨平台GUI有多好的工具可用。有一些低级别的操作系统调用在不同的平台上会有所不同。主要目标不是最终得到需要单独开发和维护的软件的两个单独版本。
There is a large existing code base for a complex app that is written in C++ using MFC and WinAPI which needs to be ported to Mac OS X. The ideal solution is to have as much code common between the different platforms, especially code such as business logic. The GUI might be different depending on how good tools are available for a cross platform GUI. There are some low level OS calls which will be different on different platforms. The major goal is not to end up with two separate versions of the software that need to be developed and maintained separately.
我一直在看Qt,但我会很好奇了解其他替代方法,以及人们如何解决这个问题。
I have been looking at Qt but I would be curious to know what other alternatives are there, and how people have solved this problem in the past.
- 如果您要移植现有的应用程序
- 如果你可以从两个平台上从头开始项目,你会用什么/你会怎么做?
推荐答案
我们在几年前做出了类似的决定,决定使用Qt。该应用程序是Windows窗体/托管C ++组合(我们没有交叉平台要求),我们对一些ui套件进行了评估,我们也考虑了Java。
We had to make a similar decision a couple of years ago and decided to go with Qt. The application was a Windows Forms/Managed C++ combination (we did not have the crossplatform requirement), we did an evaluation of some of the ui kits out there we also considered Java.
如果你熟悉MFC,你可能会发现WxWidgets更舒适我会猜到,因为它的对象结构更接近。这实际上是使我们不使用它。 Qt设计是非常周详的,是一个更好的匹配我们正在做什么。 Java被抛弃了作为一个选项,因为我们没有真正有很多的知识在内部。
If you are familiar with MFC you might find WxWidgets more "comfortable" i would guess as it's object structure is closer to that. This is actually what made us not use it. The Qt design is very well thought out and was a better match for what we were doing. Java was discarded as an option as we did not really have a lot of knowledge in house.
从头开始我会再次选择Qt(即使有一些事情发生与诺基亚)我还是喜欢的工具包。我可能会考虑的选项,当我们做第一次评估时(由于项目的可用性和约束),Mono,Adobe Air或纯粹基于Web的应用程序。
Starting from scratch i would chose Qt again (even with some of things going on with Nokia) I still like the toolkit. Options that I might consider that we did not consider when we did our first evaluaten (due to availability and constraints of the project) Mono, Adobe Air, or a purely web based application.
这篇关于跨平台Windows / OS X开发,具有大型现有代码库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!