LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2009, 06:31 AM   #1
learner9
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Rep: Reputation: 0
best c++ Compiler with IDE


Hi
What is the best C++ Compiler with IDE?
 
Old 08-08-2009, 06:50 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by learner9 View Post
What is the best C++ Compiler with IDE?
Almost everything in Linux is more layered than your question assumes.

There is one most popular C++ compiler in Linux (GCC) which holds such a large fraction of "market" for free C++ compilers that others aren't really worth considering.

There are many IDEs for Linux. Each of them can be used with GCC. I'm pretty sure most of them could be used with other compilers as well. So your selection of a C++ compiler and your selection of an IDE are pretty independent.

KDevelop is one of the popular choices for an IDE. I haven't tried any of the others enough to make a meaningful comparison.

Intel makes and sells a C++ compiler for Linux (and a similar one for Windows) that is probably better than GCC. Certainly with a simple set of command line switches and no special optimization attributes in the source code, the Intel compiler will generate significantly better object code. It is also bundled with a math library (exp, log, trig functions, etc.) that is significantly better than the GNU math library. So if price is not a factor in selecting "best" the Intel C++ compiler is probably best.

GCC gives very advanced programmers a lot more control of inlining and aliasing and code "temperature" and other factors that effect the performance of the final code, using command line switches to tweak optimization and using attributes within the source code to guide the optimizer.

The Intel compiler recognizes all those GCC switches and attributes, but generally ignores them and optimizes according to its built in rules regardless of what the programmer tries to tweak. With enough effort using optimization attributes, etc. you can often get GCC to generate better 64 bit code than there is any way to get the Intel C++ compiler to generate. I think in 32 bit Intel starts so far ahead that no tweaking could close the gap.

So Intel is clearly a better compiler (ignoring price) for ordinary programmers who don't have the skill nor time to tweak all those things. GCC might be better for those who really need to achieve best performance 64 bit code even at large extra effort.

Of course most people asking in this forum assume free, so GCC is the only C++ compiler worth considering and your choices are just on the IDE side.

Another detail, in case anyone really cares about the GCC/Intel comparison:

The Intel compiler itself is a 32 bit program even when generating 64 bit code. That makes it run a little faster (compilers internally use a lot of pointers and thus in 32 bit mode they have fewer cache misses and run faster). But 32 bit mode is limited in the complexity of code that it can compile and optimize. Large projects may have modules that are too complex for a 32 bit compiler to optimize or even too complex for it to compile at all.

GCC can be configured selecting 32 bit or 64 bit for the compiler itself independent of selecting 32 bit or 64 bit for the target programs. Typically one would use a 64 bit GCC to compile for 64 bit and that contributes to GCC compiling slower than Intel. You could build a 32 bit GCC that would run on a 64 bit Linux to compile 64 bit programs, but unless you built that 32 bit GCC itself with the Intel compiler, it would run slower because GCC isn't as good at generating 32 bit x86 as it is at x86_64. So the bottom line for 64 bit code is that GCC takes longer to compile but has higher limits on the complexity of code it can compile.

Last edited by johnsfine; 08-08-2009 at 07:04 AM.
 
Old 08-08-2009, 08:35 AM   #3
f14f21
Member
 
Registered: Sep 2008
Distribution: rhel
Posts: 42

Rep: Reputation: 6
thanx johnsfine
ur guidance about x64,x32,gcc was very helpful
 
Old 08-10-2009, 01:39 AM   #4
learner9
LQ Newbie
 
Registered: Jun 2009
Posts: 15

Original Poster
Rep: Reputation: 0
thanks
 
Old 08-10-2009, 08:03 AM   #5
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
wow John that was really helpful, I've been wondering about alternative linux compilers for a while...
anyway for learner- the IDE I like is Code::Blocks personally. It has built in support for other library extensions such as FLUID, OpenGL, GTK+, etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ IDE+Compiler?Java IDE+compiler? Boby Linux - Software 3 05-31-2005 01:12 PM
How to add a C/C++ compiler or developtment IDE itaydagani Amigo 9 01-29-2005 03:20 AM
java compiler(IDE) VS.net style? marlor Programming 12 01-21-2005 02:11 PM
compiler(IDE) for linux wogga Linux - Software 9 06-01-2004 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration