请帮助c ++中使用哪个版本 [英] Please help Which version used in c + +

查看:74
本文介绍了请帮助c ++中使用哪个版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我从c#改为C + +编程I(由于使用.net)

我是。网不喜欢。

我想写一个带c + +的程序。

硬件。游戏机(playstation&xbox和...........)Windows。

我使用的是哪个版本?

谢谢。

Hello.
I changed from c # to C + + Programming I (due to use. Net)
I am. Net not like.
I wanna write a program with c + + for anything.
Hardware. Consoles (playstation & xbox and ...........) Windows.
Which version am I using?
Thank you.

推荐答案

您不太可能找到一个允许您为各种各样的目标平台生成二进制文件的开发工具。



多平台开发是一个非常重要的组织和技术问题,也是这些产品往往来自能够负担多个团队的大型(r)公司的一个原因。

至于具体细节:

Windows - Visual Studio

XBox - 我认为Visual Studio + Xbox SDK有自定义编译器和工具集。

PS - http://www.snsys.com/



其他硬件?要看。您可能会使用gcc来获取嵌入式内容,但是您必须看看每个工具包的制造商建议的内容。



如果您仍希望定位多个从单个代码库转移到多个编译器的平台然后C ++(可能)是一个不错的选择,但是在开发代码时必须非常小心:



1限制/避免完全使用该语言的编译器供应商特定扩展。



2限制/避免完全使用编译器供应商特定的库。



3要非常小心使用标准化语言的各个方面,但不同供应商对标准的解释可能不同。 IIRC C ++曾经有一些这样的实例。自从我上次使用该语言以来,情况可能有所改善。



4避免使用平台特定的优化/技巧。这可能会对性能产生负面影响。



5考虑目标平台上的资源限制。您的代码必须编写为在功能最少的设备的限制内工作。例如,如果你的一个目标RAM有限,你将无法使用大型内存数据结构。



如果你正在编写高性能软件(例如图形密集型)那么你将立即违反上面列表中的第一点,可能是第四点,因为你几乎肯定必须使用低(呃)级别和机器特定的API来获得必要的速度。



如果你小心或幸运,你最终会得到一个共同源代码的核心,包含/调用每个目标的平台特定代码。



我曾经在20年前做过这样的事情,在一个更简单的用户期望更低的世界中使用了一种据称严格的ANSI标准化语言。那是一种痛苦,我不认为它会变得更容易。



祝你好运。
You are unlikely to find a single development tool that will allow you to generate binaries for such a wide variety of target platforms.

Multi-platform development is a non-trivial organisational and technical problem and one reason why such products tend to come from large(r) companies that can afford to run multiple teams.

As for specifics:
Windows - Visual Studio
XBox - Visual studio + Xbox SDK which I believe has a custom compiler and toolset.
PS - http://www.snsys.com/

Other hardware? Depends. You might get away with gcc for embedded stuff, but you'll have to see what the manufacturer of each piece of kit suggests.

If you still want to target multiple platforms from a single codebase fed to multiple compilers then C++ is (probably) a good choice however you will have to be very careful when developing code to:

1 Restrict/avoid completely use of compiler vendor specific extensions to the language.

2 Restrict/avoid completely use of compiler vendor specific libaries.

3 Be very careful about using aspects of the language that are standardised but where the standard can be and has been interpreted differently by different vendors. IIRC C++ used to a have a few instances of this. Things may have improved since I last used the language.

4 Avoid platform specific optimisations/tricks. This might have an adverse effect on performance.

5 Think about resource constraints on the target platforms. Your code will have to be written to work within the limits of the least capable device. For example you won't be able to use large in-memory data structures if one of your targets has limited RAM.

If you are writing high-performance software (eg graphics intensive) then you will immediately fall foul of the first point on the list above and probably the fourth as you will almost certainly have to use low(er) level and machine specific APIs to get the necessary speed.

If you are careful and or lucky you will end up with a single core of common source code wrapped about with /calling into platform specific code for each target.

I've done this once before, 20 years ago, in a much simpler world of lower user expectation using an allegedly tightly ANSI standardised language. It was a pain then and I don't expect it's got any easier since.

Good luck.


这篇关于请帮助c ++中使用哪个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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