Compilers,IDE,Debugger (转) Windows 和 Linux下的编译器 IDE

Compilers, IDEs, Debuggers and the Jazz

Zaita (2112)   Link to this post Jan 27, 2009 at 5:34am
Another article to cover a very common topic. Often questions come up like:
- What IDE can I use?
- What compilers are there?
- What <insert> is the best?

Let's start with:
Compilers:
A compiler is a command line application (in most cases) that takes your source code files and generates an executable. The methods used to do this and the resulting size/optimized executable will vary based on compiler.

A compiler does not help you write code, it's not a development environment where you can type code. It's sole purpose is to take code already written and build an executable.

No one compiler is better than any other. They all have their pros and cons. If you wish to compare compilers, please do so from the technical specifications on their own websites. In most cases, this is not going to serve you any great purpose. If optimization is your concern, your best bet is to follow standard coding techniques when developing highly optimized code.

Some common compilers are:
- MS Visual C++ Compiler (Windows) - http://www.microsoft.com/express/vc/
- GCC (Linux) - http://gcc.gnu.org/
- MingW (Windows) - http://www.mingw.org/
- Intel C++ Compiler (Linux, Windows, OS X) - http://www.intel.com/cd/software/products/asmo-na/eng/compilers/284132.htm
- Borland C++ Compiler (Windows) - http://www.borland.com

Integrated Development Environments (IDE)

An IDE is a full suite for software development. Typically they come bundled with a text editor, a compiler and a debugger. The text editors are the main component as they offer functionality like Syntax highlighting, project management, source-control integration etc.

An IDE is not a compiler, but most IDEs will come with one of the compilers listed in the previous section.

e.g Dev-C++ comes with MingW, Code::Blocks comes with GCC.

The complexity of IDEs will vary greatly, while some are better suited for new developers and some for advanced/professional developers.

Note: Dev-C++ is no longer recommended on their official forum. wxDev-C++ should be used instead.

Some common IDEs:
Easy to Use
wxDev-C++ (Windows) - http://wxdsgn.sourceforge.net/
Anjuta (Linux) - http://anjuta.sourceforge.net/

Medium
Code::Blocks (Windows/Linux) - http://www.codeblocks.org/
MS Visual C++ Express (Windows) - http://www.microsoft.com/express/vc/
NetBeans (All) - http://www.netbeans.org/
KDevelop (Linux) - http://www.kdevelop.org/
Borland C++ (Windows) - http://www.borland.com

Difficult
Eclipse CDT (All) - http://www.eclipse.org/

Note: You are also free to write code in any of your favorite text editors then compile it manually.

Debuggers
Debuggers are used to analyze your application while it's running. You are able to pause your application at selected points (breakpoints) and view information such as variable values etc.

Currently, there only seems to be 2 major debuggers in use.

Microsoft Visual Studio Debugger (Windows)
This is a high quality debugger. It's easy to use and integrates seemlessly into the visual studio IDE. It does have some slight problems when dealing with multiple threads, but generally works very well.

GDB (All)
This is an open source debugger often run alongside GCC/MingW. It's also a good quality debugger, but unfortunately it's multi-threaded debugger is considerably behind the visual studio equal.

Fortunately, GDB is platform independent and will integrate with numerous IDEs. Unfortunately, this integration is sometimes very difficult to work with and not intuitive.

Please post corrects/comments or questions below.
Last edited on Jan 27, 2009 at 5:35am

Mythios (824)   Link to this post Jan 27, 2009 at 5:57am
Very nicely written, one question though. Why do you say Dev-C++ is easy and MS Visual C++ is Medium?

Zaita (2112)   Link to this post Jan 27, 2009 at 5:58am
Justification for that is that Visual Studio offers more functionality. Especially when working in .NET. You can link assemblies from different languages, it has proper integrated source-control and you can use other plugins (e.g SVN). You can also have multiple projects per solution etc.

It's considerably more complicated than Dev-C++(wxDev-C++)

Mythios (824)   Link to this post Jan 27, 2009 at 6:10am
Myself - I didn't use Dev-C++ very long but main point being is I take it Dev-C++ can't do the above of what you said Visual Studio can do.

Which Compiler do you use Zaita and why do you prefer it?

Zaita (2112)   Link to this post Jan 27, 2009 at 6:13am
Eclipse (with CDT plugin).

I use this because my development is for both Windows and Linux systems. So I prefer to have an IDE I can use across multiple platforms. Eclipse also has a good plugin framework, so I am able to use the same SubVersion plugin on both my installations.

I also use it because it has other plugins I like (PHP, Database, Modelling etc)

My compiler is GCC (Linux) and Mingw(Windows). I use GDB on both platforms.

Mythios (824)   Link to this post Jan 27, 2009 at 6:21am
Ah very nice, for me I had been studying at Atari and am currently finishing my Major in game development over the next two-ish years. So I'm looking forward for that to finish off. But I'm enjoying it a lot. Main point being - they used Visual Studio so I've gotten very use to that over the time. I had been using NetBeans for a while but mainly for Java at the time of study during my Business programming course. All in all I love visual studio for the fact being of I find it very simple and straight forward to set up.

helios (5504)   Link to this post Jan 27, 2009 at 9:54am
Small correction: Code::Blocks for Windows comes optionally with MinGW, not GCC. Code::Blocks compiled from source comes with no compiler.

Zaita (2112)   Link to this post Jan 28, 2009 at 2:40am
MingW is a patched version of GCC. And you'd expect the source to come with no compiler. That's typical of any application you build from source.

Mythios (824)   Link to this post Jan 28, 2009 at 2:44pm
Oh, I didn't know that. Would one say that MingW would technically be better tha GCC? I'm not sure as I don't use either of them.

helios (5504)   Link to this post Jan 28, 2009 at 9:42pm
I think "patched" is a little misleading. It's just GCC plus the WinAPI, and outputting PE instead of ELF.
Last edited on Jan 30, 2009 at 9:40am

Mythios (824)   Link to this post Jan 30, 2009 at 9:36am
Oh yeah, I see what you mean. That still would technically be a patched version - but I do understand what you mean :)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值