关于编写可移植C ++应用程序的建议 [英] Advice on writing portable C++ application

查看:67
本文介绍了关于编写可移植C ++应用程序的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是编写一个工作室类型的应用程序,该应用程序最初将在Windows上运行
,但我希望它能够在其他平台上以最低的价格运行。


我决定使用C ++。


通过这个NG获得的建议(谢谢!)我能够确定

最明显的组件上的可用替代品必须是可移植的b
,即GUI库。我仍然需要在3个大的b $ b $之间做出决定(它们是3,对吧?)。


但我的问题是关于非GUI的东西:还有什么我该怎么办?
实现便携性?假设我想打开一个文件。我不想

使用Windows特定的系统调用,但是要使用像

''fopen()''这样的东西。什么非GUI库或编程环境建议使用



TIA,


-Ramon

My goal is to write a studio-type application which will initially run
on Windows, but I would like it to run on other platforms with minimum
efforts.

I have made the decision to go with C++.

Through advice obtained in this NG (thanks!) I was able to determine
the available alternatives on the most obvious component that must be
portable, i.e. the GUI library. I still have to decide among the 3 big
ones (they are 3, right?).

But my question is about non GUI stuff: what else should I do to
achieve portability? Let''s say I want to open a file. I don''t want to
use the Windows specific system calls, but to use something like
''fopen()''. What non-GUI libraries or programming environments are
recommended?

TIA,

-Ramon

推荐答案

Ramon F Herrera写道:
Ramon F Herrera wrote:

我的目标是写一个工作室-type application
My goal is to write a studio-type application



What''sastudio-type application?类似于Visual _Studio_?

What''s a "studio-type application"? Similar to Visual _Studio_?


最初将在Windows上运行
,但我希望它能在其他平台上运行,最小值为努力。


我决定使用C ++。


通过这个NG获得的建议(谢谢!)我能够确定最明显的组件上的可用替代品,这些组件必须是可移植的,即b $ b便携式,即GUI库。我仍然需要在3个大的b $ b $之间做出决定(它们是3,对吧?)。


但我的问题是关于非GUI的东西:还有什么我该怎么办?
实现便携性?假设我想打开一个文件。我不想

使用Windows特定的系统调用,但是要使用像

''fopen()''这样的东西。建议使用哪些非GUI库或编程环境?

which will initially run
on Windows, but I would like it to run on other platforms with minimum
efforts.

I have made the decision to go with C++.

Through advice obtained in this NG (thanks!) I was able to determine
the available alternatives on the most obvious component that must be
portable, i.e. the GUI library. I still have to decide among the 3 big
ones (they are 3, right?).

But my question is about non GUI stuff: what else should I do to
achieve portability? Let''s say I want to open a file. I don''t want to
use the Windows specific system calls, but to use something like
''fopen()''. What non-GUI libraries or programming environments are
recommended?



通常,设计为可移植的库包含一些非GUI

的东西。例如,Qt有线程,定时器,字符串等。据我记得,甚至
对目录枚举和文件路径管理有一些支持

。 RTM(或谷歌)了解更多。


如果您找不到(或决定不使用)提供

这些东西的图书馆,那么你可以自己编写或在网上查找

替代品。据我所知,他们确实存在,可能还有很多,其中包括b $ b。对你来说主要的问题是他们并不是真的好b $ b,因为他们不支持C ++存在的所有平台

因此你应该尝试在新闻组专用到你想要定位的

操作系统。


V

-

请在通过电子邮件回复时删除大写''A'

我没有回复最热门的回复,请不要问

Usually the libraries designed to be portable contain some non-GUI
stuff. For example, Qt has threads, timers, strings, etc. It even
has some support for directory enumeration and file path management
as I recall. RTM (or Google) for more.

If you can''t find (or decide not to use) a library that provides
those things, you could write your own or look on the Web for the
alternatives. For all I know they do exist, and probably plenty
of them. The main problem for you is that they are not really
topical since they don''t support _all_ platforms where C++ exists
and hence you should try asking in the newsgroup dedicated to the
OS you''re going to target.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask

2007-11-27 18:07:44 -0500,Ramon F Herrera< ra *** @ conexus.netsaid:
On 2007-11-27 18:07:44 -0500, Ramon F Herrera <ra***@conexus.netsaid:

我的目标是编写一个工作室类型的应用程序,它最初将在Windows上运行

,但我希望它能在其他平台上运行,并且需要花费最少的工资。


我决定使用C ++。
My goal is to write a studio-type application which will initially run
on Windows, but I would like it to run on other platforms with minimum
efforts.

I have made the decision to go with C++.



你为什么不考虑java?他们似乎在每个3个大的上都有API'具有

的实现。包括你需要的图形和

文件系统。

Why are you not considering java? They seem to have API''s that have
implementations on each of the "3 big ones," including graphics and
file systems which you need.


>

通过这个NG获得的建议(谢谢!)我能够确定

最明显的组件上可用的替代品,这些组件必须是便携式的,即GUI库。我仍然需要在3个大的b $ b $之间做出决定(它们是3,对吧?)。


但我的问题是关于非GUI的东西:还有什么我该怎么办?
实现便携性?假设我想打开一个文件。我不想

使用Windows特定的系统调用,但是要使用像

''fopen()''这样的东西。什么非GUI库或编程环境建议使用



TIA,


-Ramon
>
Through advice obtained in this NG (thanks!) I was able to determine
the available alternatives on the most obvious component that must be
portable, i.e. the GUI library. I still have to decide among the 3 big
ones (they are 3, right?).

But my question is about non GUI stuff: what else should I do to
achieve portability? Let''s say I want to open a file. I don''t want to
use the Windows specific system calls, but to use something like
''fopen()''. What non-GUI libraries or programming environments are
recommended?

TIA,

-Ramon



-


-kira

--

-kira


11月27,7:26 pm,Victor Bazarov < v.Abaza ... @ comAcast.netwrote:
On Nov 27, 7:26 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:

Ramon F Herrera写道:
Ramon F Herrera wrote:

我的目标是写一个工作室类型的应用程序
My goal is to write a studio-type application



什么是工作室类型的应用程序?类似于Visual _Studio_?


What''s a "studio-type application"? Similar to Visual _Studio_?



回到最早的工作室类型的应用程序,我看起来类似于MacPaint / MacDraw的
。你有一个调色板,你选择组件

并将它们拖到画布上。你有一个长方形的选择

工具,调整大小,移动,那种东西。


与编译没什么关系。


-Ramon

Going back to the earliest studio-type apps, mine is something similar
in look to MacPaint/MacDraw. You have a palette, you pick components
and you drag them around a canvas. You have a rectangular selection
tool, resizing, moving, that kind of stuff.

Nothing to do with compiling.

-Ramon


这篇关于关于编写可移植C ++应用程序的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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