By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,905 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,905 IT Pros & Developers. It's quick & easy.

BEST C++ COMPILER

P: n/a
Which is the BEST C++ COMPILER available?

Oct 23 '05 #1
Share this Question
Share on Google+
15 Replies


P: n/a
coinjo wrote:
Which is the BEST C++ COMPILER available?


Kind of depends upon your criterion.

I use g++ because it works on all the platforms I use (Windows, Linux,
and Mac OS X) and it's free software. The 3.4 series is fairly compliant
with the standard. The 4.0 series is supposedly even better, but I am
always wary of the new major gcc releases. They always seem bug-riddled.

Comeau C++ is not free, but is supposedly the most standards-compliant
compiler available, if that is important to you. If I had any money, I
would probably try it out. Ported to a number of platforms, but I don't
think they have a Mac OS X version, and my software has to run on Mac OS X.

Visual C++ 7.1 is also fairly compliant, and is fast and produces small
executables on Windows. It's not portable, obviously. Visual C++ 6.0 is
not all compliant, so I wouldn't use it if I were you. There is a beta
of VC++ 8 I think available now. It's probably better than 7.1, but I
haven't used it.

I think Borland C++ is awful, but I've only dealt with 5.5. Maybe they
significantly improved it for version 6.

Intel C++ produces highly optimized binaries for intel processors.
Unless I'm wrong, it only produces intel binaries though. So it's not
very helpful if you're not developing for x86 systems.

There are tons of other compilers out there, but these are the ones I
know about. I've never used Comeau or Intel, so my information comes
entirely from their respective websites.

So, to answer your question, g++ is the best compiler available, for me
anyways. I guess I could use VC 7.1 on Windows, Comeau on Linux, and g++
on OS X, but I prefer to stick with one compiler, if possible. I'm also
partial to free software.

--John Ratliff
Oct 23 '05 #2

P: n/a
John Ratliff raše:
So, to answer your question, g++ is the best compiler available, for me
anyways. I guess I could use VC 7.1 on Windows, Comeau on Linux, and g++
on OS X, but I prefer to stick with one compiler, if possible. I'm also
partial to free software.

Can also advise what IDE is the best for g++ on each platform?
I heard about KDevelop (i think it doesn't run on windows without
cygwin + qt3 + KDE though). Are there any better choices?

PS: Sorry if this question is not appropriate for this group. It's just
that, there are so many groups about C++. And besides, i didn't wanted
to start new thread.

Oct 23 '05 #3

P: n/a
paulius-maruska wrote:
John Ratliff raše:
So, to answer your question, g++ is the best compiler available, for me
anyways. I guess I could use VC 7.1 on Windows, Comeau on Linux, and g++
on OS X, but I prefer to stick with one compiler, if possible. I'm also
partial to free software.


Can also advise what IDE is the best for g++ on each platform?
I heard about KDevelop (i think it doesn't run on windows without
cygwin + qt3 + KDE though). Are there any better choices?


You can try U++: http://upp.sf.net.

It is more than ide, but you can of course use the ide only.

Its advantage is compilation speed (via special technique, speeds up
debug mode GCC recompilations of large projects 4 times) and new release
(next month) will have advanced C++ analyzing tools... (thing class
hierarchies, code-completion, symbol info).

Mirek
Oct 23 '05 #4

P: n/a
In article <L3H6f.460110$x96.97554@attbi_s72>,
John Ratliff <us**@example.net> wrote:
coinjo wrote:
Which is the BEST C++ COMPILER available?
Kind of depends upon your criterion.


Indeed, "BEST" needs to be qualified.
I use g++ because it works on all the platforms I use (Windows, Linux,
and Mac OS X) and it's free software. The 3.4 series is fairly compliant
with the standard. The 4.0 series is supposedly even better, but I am
always wary of the new major gcc releases. They always seem bug-riddled.

Comeau C++ is not free, but is supposedly the most standards-compliant
compiler available, if that is important to you. If I had any money, I
would probably try it out. Ported to a number of platforms, but I don't
think they have a Mac OS X version, and my software has to run on Mac OS X.


Using the above points, assuming these those are of concern:
Comeau C++ works on many platforms too, including Windows, LINUX,
and Mac OS X (latter is currently in beta, but that's more an
adminstrative issue that a everything-is-broken issues which is
not the case), and can currently be had for $20 for each of these
platforms, is compliant (for C90, C99, C++98 and C++03) for years now,
and works very well on a number of platforms with Dinkumware's
compliant libs.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Oct 23 '05 #5

P: n/a
John Ratliff wrote:
Visual C++ 7.1 is also fairly compliant, and is fast and produces small
executables on Windows. It's not portable, obviously. Visual C++ 6.0 is
not all compliant, so I wouldn't use it if I were you. There is a beta
of VC++ 8 I think available now. It's probably better than 7.1, but I
haven't used it.


I tried the VC8 beta, and didn't notice too much difference with 7.1.
It's still too liberal with respect to the standard. The microsoft
people clearly state these issues tho; the website mentions which points
of the standard are ignored. Even so, code that compiles fine with VC8
and involves templates is unlikely to compile with gcc4. In the worst
case it even gets a different meaning. For example, VC8 _does_ look-up
unqualified names in dependent base classes. Depending on what globals
you have this might result in a seriously hard to track runtime bug.
Just as an example:

char* var = "good";

template <typename T>
struct B {
B() : var(0) {}
virtual ~B() {}

T var;
};

template <typename T>
struct A : public B<T> {
A() {std::cout << var;}
~A() {}
};

std::cout << "I am a ";
A<int> a;
std::cout << " compiler" << std::endl;

will print "I am a 0 compiler" on VC8, and "I am a good compiler" on
gcc4. I ran into more similar issues with VC8, so I'm not very impressed
by it so far... for learning C++ I'd definitely stay away from it.

--
Regards,

Ferdi Smit (M.Sc.)
Email: Fe********@cwi.nl
Room: C0.07 Phone: 4229
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands
Oct 23 '05 #6

P: n/a
Greg Comeau wrote:
In article <L3H6f.460110$x96.97554@attbi_s72>,
John Ratliff <us**@example.net> wrote:
coinjo wrote:
Which is the BEST C++ COMPILER available?


Kind of depends upon your criterion.

Indeed, "BEST" needs to be qualified.

I use g++ because it works on all the platforms I use (Windows, Linux,
and Mac OS X) and it's free software. The 3.4 series is fairly compliant
with the standard. The 4.0 series is supposedly even better, but I am
always wary of the new major gcc releases. They always seem bug-riddled.

Comeau C++ is not free, but is supposedly the most standards-compliant
compiler available, if that is important to you. If I had any money, I
would probably try it out. Ported to a number of platforms, but I don't
think they have a Mac OS X version, and my software has to run on Mac OS X.

Using the above points, assuming these those are of concern:
Comeau C++ works on many platforms too, including Windows, LINUX,
and Mac OS X (latter is currently in beta, but that's more an
adminstrative issue that a everything-is-broken issues which is
not the case), and can currently be had for $20 for each of these
platforms, is compliant (for C90, C99, C++98 and C++03) for years now,
and works very well on a number of platforms with Dinkumware's
compliant libs.


Will your new Mac OS X version work on the upcoming intel macs?

It's somewhat moot since I don't have $660 (Dinkumware source license +
3 platform Comeau licenses), but maybe someday I'll have $660.

--John Ratliff
Oct 23 '05 #7

P: n/a

paulius-maruska wrote in message

Can also advise what IDE is the best for g++ on each platform?
I heard about KDevelop (i think it doesn't run on windows without
cygwin + qt3 + KDE though). Are there any better choices?


Here's a few for you to check out:

Dev-C++ IDE: http://www.bloodshed.net/
MinGWStudio http://www.parinyasoft.com/
V IDE & V GUI: http://www.objectcentral.com/
Quincy IDE 2005 DL: http://pipou.net/down/Quincy2005Project.zip
( note that is a *.zip download)

--
Bob R
POVrookie
Oct 23 '05 #8

P: n/a
On 22 Oct 2005 23:46:42 -0700, "coinjo" <co****@gmail.com> wrote in
comp.lang.c++:
Which is the BEST C++ COMPILER available?


STOP SHOUTING AND LEARN SOME MANNERS. GO TO
news:news.announce.newusers AND READ.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Oct 23 '05 #9

P: n/a
Jack Klein wrote:
On 22 Oct 2005 23:46:42 -0700, "coinjo" <co****@gmail.com> wrote in
comp.lang.c++:
Which is the BEST C++ COMPILER available?


STOP SHOUTING AND LEARN SOME MANNERS. GO TO
news:news.announce.newusers AND READ.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html


well, these - how many? - 20 lines of - what? - crap do not add any
value to this newsgroup neither :(

Oct 24 '05 #10

P: n/a

"Ferdi Smit" <Fe********@cwi.nl> wrote in message
news:43***********************@news.xs4all.nl...
John Ratliff wrote:
Visual C++ 7.1 is also fairly compliant, and is fast and produces small
executables on Windows. It's not portable, obviously. Visual C++ 6.0 is
not all compliant, so I wouldn't use it if I were you. There is a beta of
VC++ 8 I think available now. It's probably better than 7.1, but I
haven't used it.


I tried the VC8 beta, and didn't notice too much difference with 7.1. It's
still too liberal with respect to the standard. The microsoft people
clearly state these issues tho; the website mentions which points of the
standard are ignored. Even so, code that compiles fine with VC8 and
involves templates is unlikely to compile with gcc4. In the worst case it
even gets a different meaning. For example, VC8 _does_ look-up unqualified
names in dependent base classes. Depending on what globals you have this
might result in a seriously hard to track runtime bug. Just as an example:

char* var = "good";

template <typename T>
struct B {
B() : var(0) {}
virtual ~B() {}

T var;
};

template <typename T>
struct A : public B<T> {
A() {std::cout << var;}
~A() {}
};

std::cout << "I am a ";
A<int> a;
std::cout << " compiler" << std::endl;

will print "I am a 0 compiler" on VC8, and "I am a good compiler" on gcc4.
I ran into more similar issues with VC8, so I'm not very impressed by it
so far... for learning C++ I'd definitely stay away from it.


Hmm...from my understanding VC8 is right in this case, but probably I'm
wrong. Could you please point out the respective part of the standard for
me. However, this situation should not arise when one sticks to a simple
(and common sense) naming scheme that differentiates members from other
variables.

Cheers
Chris
Oct 24 '05 #11

P: n/a
Hi paulius:

I think Eclipse + CDT is a very good IDE for C++. It's very powerful .
1. It uses gcc and gnu make if you create a managed makefile project.
2. When you create a unmanaged makefile project, You can write a
makefile by yourself, and use other compilers.

Don't wonder why use this IDE writed in java. Borland C++builder X is
also in java, And emacs is in Lisp.

Regards,
-Raymond

Oct 25 '05 #12

P: n/a
Raymond wrote:
Hi paulius:

I think Eclipse + CDT is a very good IDE for C++. It's very powerful .
1. It uses gcc and gnu make if you create a managed makefile project.
2. When you create a unmanaged makefile project, You can write a
makefile by yourself, and use other compilers.

Don't wonder why use this IDE writed in java. Borland C++builder X is
also in java, And emacs is in Lisp.


Actually, is not is quite strange? IMHO C++ was intented for exactly
this kind of application - IDEs, compilers, operating systems.

How is it that so many C++ tools are written in other languages? Eclipse
- Java, Dev-C++ - Pascal (!!), Borland Builder - Java, even K-Develop,
while it looks like written in C++, is actually done in specialized
dialect (MOC).

Mirek
Oct 25 '05 #13

P: n/a
paulius-maruska wrote:
John Ratliff raše:
So, to answer your question, g++ is the best compiler available, for me
anyways. I guess I could use VC 7.1 on Windows, Comeau on Linux, and g++
on OS X, but I prefer to stick with one compiler, if possible. I'm also
partial to free software.


Can also advise what IDE is the best for g++ on each platform?
I heard about KDevelop (i think it doesn't run on windows without
cygwin + qt3 + KDE though). Are there any better choices?

PS: Sorry if this question is not appropriate for this group. It's just
that, there are so many groups about C++. And besides, i didn't wanted
to start new thread.


Eclipse + CDT is nice but it's very large and is very slow,
particularly on loading. Start it loading and go for coffee!

Have a look at Code::Blocks (http://www.codeblocks.org).

Peter
Oct 25 '05 #14

P: n/a
> John Ratliff wrote:
[...]
the worst case it even gets a different meaning. For example, VC8
_does_ look-up unqualified names in dependent base classes. Depending
on what globals you have this might result in a seriously hard to
track runtime bug. Just as an example:

char* var = "good";

template <typename T>
struct B {
B() : var(0) {}
virtual ~B() {}
T var;
};
template <typename T>
struct A : public B<T> {
A() {std::cout << var;}
~A() {}
};
std::cout << "I am a ";
A<int> a;
std::cout << " compiler" << std::endl;
will print "I am a 0 compiler" on VC8, and "I am a good compiler" on

You might probably want to study the tools you use more thoroughly. The default
mode for Microsoft compilers is the backward compatibility one. They just
care about the millions of existing customers. Probably, they are too greedy
while bending down for every dollar and shall shake up their users from time
to time like Apple does.

If you do need MS VC 7.1/8 to be a "good" compiler then /Za switch shall
help. But there is no two-phase names lookup though. And no windows headers
too -- only standard ones.

--
Michael Kochetkov
Oct 26 '05 #15

P: n/a
Michael Kochetkov <Mi***************@synartra.commm> wrote:
You might probably want to study the tools you use more thoroughly. The default
mode for Microsoft compilers is the backward compatibility one. They just
care about the millions of existing customers. Probably, they are too greedy
while bending down for every dollar and shall shake up their users from time
to time like Apple does.

If you do need MS VC 7.1/8 to be a "good" compiler then /Za switch shall
help. But there is no two-phase names lookup though. And no windows headers
too -- only standard ones.


On at least MS VC 7.1, you would also want /Zc:forScope,wchar_t to tell
the compiler to obey the new C++ scoping rule in "for" loops, and to
treat wchar_t as a native type instead of a typedef.

--
Marcus Kwok
Oct 26 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.