我如何在Linux和Windows中编译和执行 [英] how can i compile and execute in linux and windows

查看:65
本文介绍了我如何在Linux和Windows中编译和执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想开始编程C ++
所以我想使用一个可以在linux中使用我的代码并同时实现Windows和Windows的编译器...而且我也可以编译该代码并在其中创建exe
谢谢

hi every one
i wanna start to programming c++
so i want use a compiler that i can use of my code in linux and wondows both...and also i can compile that code and make exe in there
thank you

推荐答案

看看 gcc [ ^ ].


除了使用GCC之外,只需将源代码编译为二进制可执行文件,就有许多同时具有Windows和Linux端口的开发环境-使您可以轻松地在两个操作系统之间进行切换.

立即想到的两个是Code :: Blocks和Eclipse.有了这些,IDE从一个操作系统到另一个操作系统在本质上是相同的.不幸的是,我认为Eclipse是用Java编写的,因此它在冬季的运行速度与蜜月一样快,尽管与CB相比,它确实提供了与Visual Studio更加接近的体验.例如,Eclipse中提供了更好的智能感知和调试支持.


根据您要制作的程序类型,您可能还希望研究跨平台的GUI库,因为MS Windows系统和X-Windows子系统都非常不同.

同样,我有两个建议-WxWidgets和GTK.



哦!只是想起了第三个选择-QT Creator.大约5年前尝试过,似乎还可以.并非真正适合我,而是一种功能强大且相当受欢迎的解决方案.

细读的几个链接:

http://www.codeblocks.org [ ^ ]
http://www.eclipse.org [ ^ ]
http://www.wxwidgets.org/ [ ^ ]
http://www.gtk.org [ ^ ]
http://qt.digia.com/product/developer-tools/ [
In addition to using GCC, which will simply compile the source into the binary executables, there''s a number of development environments that have both windows and linux ports - allowing you to effortlessly switch between the two OSs.

The two that come to mind immediately are Code::Blocks and Eclipse. With each of these the IDE is essentially identical from one os to another. Unfortunately, in my opinion, Eclipse is written in Java, so it runs as quick as honey in the winter-time, though it does offer an experience that more closely mirrors that of Visual Studio compared to CB. There''s better intellisense and debugging support in Eclipse, for instance.


Depending on the type of programs you wish to make, you may also wish to investigate cross-platform GUI libraries, as the MS Windows system and the X-Windows subsystems are both very different.

Again, I''ve a pair of suggestions - those being WxWidgets and GTK.



Oh! Just remembered about a third option - QT Creator. Tried that about 5 years ago and it seemed okay. Not really for me, but a perfectly capable and reasonably popular solution.

A couple links to peruse:

http://www.codeblocks.org[^]
http://www.eclipse.org[^]
http://www.wxwidgets.org/[^]
http://www.gtk.org[^]
http://qt.digia.com/product/developer-tools/[^]


这篇关于我如何在Linux和Windows中编译和执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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