我的C ++程序可以在linux/windows/mac上运行吗? (Eclipse IDE帮助) [英] Will my C++ Program work on linux/windows/mac? (Eclipse IDE Help)

查看:83
本文介绍了我的C ++程序可以在linux/windows/mac上运行吗? (Eclipse IDE帮助)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习C ++,因为我已经了解Java和C#,所以我认为自己将学习三大编程语言老板中的最后一个.

所以我下载了C ++ Eclipse版本,但有点困惑.当我去创建一个项目时,我需要加入工具链".我不知道这些是什么.

我需要选择什么设置才能创建可在Mac,Linux和Windows上运行的C ++程序?

谢谢!

I want to learn C++ because I already know Java and C#, so I figured I would learn the last of the top 3 programming language bosses.

So I downloaded the C++ Eclipse version, but am a little confused. When I go to create a project I need to hook into "toolchains". I have no idea what these are.

What settings will I need to select to create a C++ program that will run on Mac, Linux, and Windows?

Thanks!

推荐答案

工具链:我将使用默认的一个工具链(如果有).或您的计算机上安装的是什么(即,如果您具有gcc/g ++,我将假定默认的工具链就是那个.

无论如何,当一个人希望能够编写多平台程序时,就有2条开发路径:

1-仅使用不同平台之间可用的最低通用API,这意味着将需要重新编写所有UI和大多数/所有低级API,以适应环境中的差异.幸运的是,带有STL和boost的C ++将提供一个很好的跨平台解决方案.但是您可能必须为每个平台生成不同的项目/构建环境和/或学习使用make(和makefile)

2-使用支持QT等所有环境的工具包;有利的一面是,在不同的平台上构建应该很容易;缺点是,由于它是跨平台的,因此行为不会像人们期望的那样自然. (某些UI在不同的平台上会感觉很奇怪(但这是几年前使用QT的经验)

祝你好运
Toolchains : I''d use the one toolchain that is the default (if one is available); or what is installed on your machine (i.e. if you have gcc/g++ , I would assume the default toolchain will be that.

In any case, when one wants to be able to program multi-platform, one has 2 development path :

1- use only the lowest common API available between the different platforms, meaning that all UI, and most/all low level API will need to be re-written to fit the difference in the environment. Luckily, C++ with STL and boost will offer a good cross-platform solution. But you will probably have to generate a different project/build environment for each platform and/or learn to use make (and makefiles)

2- use a toolkit that support all environment like QT; the up side is that it should be easy to build on the different platforms; the downside is that because it is cross-platform the behaviour will not be as native as one would expect. (some UI will feel weird on the different platforms (but that is from experience with QT from a few years ago)

Good luck


google不是与Linux兼容吗?
Isn''t google compatible with Linux?


这篇关于我的C ++程序可以在linux/windows/mac上运行吗? (Eclipse IDE帮助)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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