Best compiler out there?

C

Computer Whizz

Hiya...

I've a little experience in C++, PHP, and a lot in BASIC... But I wish to
move into C++ programming A LOT. Any good compilers/editors/VDI (visual
development interface? - can't remember exactly) out there?

I've heard of Borland, and have the command line one - but I'm wondering if
it's a little old now. So if anyone can help out that would be smashing.

I'm specifically hoping to move more into the games development area, so if
there is a compiler/editor more suited towards that purpose it would be very
much appreciated for any advice you could give me.

Thank you for your time.
 
D

David Lindauer

Computer said:
I've heard of Borland, and have the command line one - but I'm wondering if
it's a little old now. So if anyone can help out that would be smashing.

the borland compiler is *very* up-to date... from what I can tell they took the
compiler out of their C++ builder platform (which is still undergoing revs from
what I know) and distributed it as a command line tool. In any case it is much
improved over the last version of the compiler package they actually sold as a
compiler package... I haven't been able to find modern C++ language constructs
it can't compile... and the WIN32 headers are up to date too. Along with your
favorite editor and the 'free' debugger they distribute it makes a decent
package. I concede it isn't as nice as an IDE tho.

Beyond using that, your best bet may be one of the GNU compilers, maybe the
cygwin collection is what you need if thinking WIN32. I think the IDE is called
RAWHIDE or something like that. Never used it so I can't say much about it.

David
 
J

Jonathan Turkanis

David Lindauer said:
the borland compiler is *very* up-to date...

Did you omit a smiley here? Borland 5.x is quite elderly now. Borland has a new
EDG-based version of its compiler, which it distributes with C++BuilderX, but
last time I checked it was in a preview stage. To find out more ask at one of
the Borland groups such as borland.public.cbuilderx.compilers.

The latest versions of the Microsoft, Intel, Comeau and GNU compilers are
excellent.

Jonathan
 
D

Dave Townsend

Computer Whizz said:
Hiya...

I've a little experience in C++, PHP, and a lot in BASIC... But I wish to
move into C++ programming A LOT. Any good compilers/editors/VDI (visual
development interface? - can't remember exactly) out there?

I've heard of Borland, and have the command line one - but I'm wondering if
it's a little old now. So if anyone can help out that would be smashing.

I'm specifically hoping to move more into the games development area, so if
there is a compiler/editor more suited towards that purpose it would be very
much appreciated for any advice you could give me.

Thank you for your time.

I was having problems compiling the example code in Modern Design Patterns
by Andrei Alex*scu,
my VC6++, Borland and GCC blew up, I think VC .Net did slightly better.
What compiler
will handle all that tricky template stuff ( like the typelists I recall ) ?
 
S

Sumit Rajan

Dave said:
I was having problems compiling the example code in Modern Design Patterns
by Andrei Alex*scu,
my VC6++, Borland and GCC blew up, I think VC .Net did slightly better.
What compiler
will handle all that tricky template stuff ( like the typelists I recall ) ?

You could try Comeau C++ - http://www.comeaucomputing.com
 
N

Nicolas Pavlidis

I was having problems compiling the example code in Modern Design Patterns
by Andrei Alex*scu,
my VC6++, Borland and GCC blew up, I think VC .Net did slightly
better.

With gcc I had no problems with 3.2 and newer versions.
VC works well with 7.1
For VC 6.0 and 7.0 there are special ports but there were some changes
necessary I think, so it would be better using 7.1, which is also freely
available.

Kind regrads,
Nicolas
 
T

Tom Widmer

I was having problems compiling the example code in Modern Design Patterns
by Andrei Alex*scu,
my VC6++, Borland and GCC blew up, I think VC .Net did slightly better.
What compiler
will handle all that tricky template stuff ( like the typelists I recall ) ?

These versions and later of these compilers shouldn't have any
problems:

Borland C++ (BuilderX preview compiler)
Comeau C++ 4.2
GCC 3.4
Intel C++ 8
Metrowerks Codewarrior ? (but anything from the last 2 years probably)
Microsoft VC++ 7.1

Others may be able to add to the list. Also check out
http://sourceforge.net/projects/loki-lib/ - the library has
workarounds for older compilers, and the code has been fixed to be
standards compliant (some of Andrei's wasn't IIRC).

Tom
 
O

Old Wolf

David Lindauer said:
the borland compiler is *very* up-to date...

I think you mean "out-of-date"
from what I can tell they took the compiler out of their C++
builder platform (which is still undergoing revs from what I know)

There's no sign from Borland that there will ever be any more
releases of C++Builder, they have been having administration
difficulties lately. The last release was 28-Mar-2002 and since
then there have only been a few bug-fix patches after customer
pressure.
and distributed it as a command line tool.

This was version 5.5.1
In any case it is much improved over the last version of the
compiler package they actually sold as a compiler package...
I haven't been able to find modern C++ language constructs
it can't compile...

Even the latest version (5.6.4, which comes with the C++BuilderX
preview) doesn't compile Boost::Lambda or Boost::Spirit, which
don't even do anything too complicated (and I would have loved
to use in my windows-based projects -- instead I wrote that part
of my program in g++ on a linux pc, and access it by tcp/ip
from the windows program :-/ )

Allegedly the current development version (5.7) will do so,
but we can't know until they release it.
I concede it isn't as nice as an IDE tho.

It would be if it didn't crash all the time, and it had an
upgrade path (IMHO).
 
C

Computer Whizz

So the opinions of everyone here is to go for a gnu compiler?

I like the idea, since it is probably easier to port to linux, right?

I shall be listening to this newsgroup alot, but hardly post... Thank you
for your help - all of you!

Oh, any IDE's available for the compiler? Just simple ones would be nice...
I'll probably stick to an editor, or write my own when I get around to it...
But a nice IDE to simplify things is always nice!
 
M

Mike Tyndall

So the opinions of everyone here is to go for a gnu compiler?
I like the idea, since it is probably easier to port to linux, right?

I shall be listening to this newsgroup alot, but hardly post... Thank you
for your help - all of you!

Oh, any IDE's available for the compiler? Just simple ones would be nice...
I'll probably stick to an editor, or write my own when I get around to it...
But a nice IDE to simplify things is always nice!

Go here to get an IDE (Dev-C++) plus the compiler:
www.bloodshed.net

<OT>
BTW, here are a few game programming newsgroups for you:

alt.games.programming
comp.games.development.programming.algorithms
comp.games.development.programming.misc
comp.graphics.algorithms

I'm headed the same way you are :)
</OT>

Good luck!

//mike tyndall
 
R

Rob Williscroft

Computer Whizz wrote in in
comp.lang.c++:
So the opinions of everyone here is to go for a gnu compiler?

I doubt its everyone :), but possibly the majority, though one of
the nice things about g++ (MingW) for windows is it will actually
compile code that #includes <windows.h>, even when the compiler is
in conforming mode, there may be other windows compilers that will
do this, but I haven't found one yet (although I haven't actually
looked that hard :).
I like the idea, since it is probably easier to port to linux, right?

The best way to write portable C++ is to write Standard C++, so any
conforming compiler will do, which leads me too:

Get more than one compiler, puting your code through multiple compilers
can help alot:

- Compilers conform better or worse in different areas, so if your code
compiles (and subsiquently run's) with more than one compiler, there
is a better chance your code is portable.

- Different compilers give different error mesages, often these can be
quite cryptic (pariticularly for beginners), however a different
compiler *might* give a more understandable error message in some
cases.

Also check each compilers docs and find out how to put them in standard
conforming mode, unfortunatly most compilers *don't* do this by default.

For g++ the switches are -pedantic and -ansi (IIRC).
I shall be listening to this newsgroup alot, but hardly post... Thank
you for your help - all of you!

There is also comp.lang.c++.moderated, lurk :) there too

Rob.
 
J

Jonathan Turkanis

Computer Whizz said:
So the opinions of everyone here is to go for a gnu compiler?

It's partly a matter of taste, but if a powerful IDE is important to you I
recommend VC++, if you can afford the full price or can get it at a discount.
It's not the most conformant compiler -- that distinction probably goes to
Comeau -- but it's now pretty close.

To test your code for portability, you can always use GCC (free) and/or Comeau
(cheap).

Jonathan
 
N

Nicolas Pavlidis

Computer Whizz said:
Hiya...
Hi!

I've a little experience in C++, PHP, and a lot in BASIC... But I wish to
move into C++ programming A LOT. Any good compilers/editors/VDI (visual
development interface? - can't remember exactly) out there?

For Windows it depends if you want to pay or not.
If you wanna pay MS Visual Studio is not that bad although there are
some problems with the Editor.

If you daon't wanna pay there are several ports of very good editors
comming from Linux, as Emacs or gvim.

All major compilers are freely available, MSVC 7.1, Borland bcc 5.5 and
gcc ;-), which is called MinGW under Windows.

All these problems you wont have if you wanna use Linux.

It a bit hard to come into Emacs (for example) but I strongly recomend
to work with or another good editor.
I'm specifically hoping to move more into the games development area, so if
there is a compiler/editor more suited towards that purpose it would be very
much appreciated for any advice you could give me.

Here the problem for you will be to find good librarys, such as OpenGL
or so. OpenGL is available for Windows and Linux. Windows only game can
be written in DirectX, but I don't kow if it's freely available for
developing games.

HTH && Kind regrads,
Nicolas
 
C

Computer Whizz

Nicolas Pavlidis said:
For Windows it depends if you want to pay or not.
If you wanna pay MS Visual Studio is not that bad although there are
some problems with the Editor.

If you daon't wanna pay there are several ports of very good editors
comming from Linux, as Emacs or gvim.

I do have VC++6 on my main system - but I think it isn't as user friendly as
it could be, and also it's mainly windows-based. If I could at least find a
couple of cross-platform libraries for the GUI and such, then it won't be
TOO hard to port... Of course I will need to change things - but hopefully
it'll make things easier and I won't need to change quite so much.
Also, I've been looking into a program a friend used to have named
"Edxor"... Seems nice, and can "squash" lines of code together inside {}'s.
I shall take a look into Emacs and gvim. Might help me out along the way.
All major compilers are freely available, MSVC 7.1, Borland bcc 5.5 and
gcc ;-), which is called MinGW under Windows.

Yes, the main reason I'm going with Dev-C++ is because the compiler is both
under linux and windows. These are the two main platforms I'm aiming at
because I only have these two systems available to me (well, win98 winXP and
Linux). If someone wished to do a port to a mac then I'm thinking that since
gcc is distributed with Linux, then it's pretty safe, and I think the GUI
library I have is available for Mac. But as bcc is getting quite old (I have
had 5.?? for a good couple of years now), and the MS compiler is really
built for windows, I think I'll go with gcc and try a compile on the others
every now and again.
All these problems you wont have if you wanna use Linux.

True, with gcc and the other one (gc++ ?)... I did find the compiling
process a little hard-ish to understand... But this was a few years ago
now - and where my linux installs were terrible (Redhat 4.0 anyone?).
It a bit hard to come into Emacs (for example) but I strongly recomend
to work with or another good editor.


Here the problem for you will be to find good librarys, such as OpenGL
or so. OpenGL is available for Windows and Linux. Windows only game can
be written in DirectX, but I don't kow if it's freely available for
developing games.

Yes. I'm hoping to do a project here or there, and find a good
cross-platform SDK which supports both OGL and DirectX... Either that or
just develop with DX for windows and OGL for Linux / choice for windows.

The DX8.1 SDK is, at least, free for development. You get a good range of
examples etc, and the help isn't too bad.

Thank you for your advice in this post, and your other about Dev-C++ having
issues with complementation... But I do think it shall be the kit I go for,
maybe switching to and from it with other editors until I find a suitable
one.
 
R

Robert Zaleski

Dev-C++ does have a Linux version, but it's pretty much unusable. So
don't pick it because you think it will work on Linux. Also, if you're
looking for a Linux distro, gentoo.org is a one with good support for
home users.

SDL has been used in allot of projects and provides OGL support and all
the types of things you get from DirectX. It's at
http://www.libsdl.org

Also, gvim and emacs are good tools, but they're not really IDEs in the
sense that you are probably thinking of. I use Vi everywhere in fact.
They have some nice features for compiling and such, but it's more an
add on to a great console based editor. So using either one is gonna
be a steep curve for you if you go that route instead of with a more
common windows IDE. Hope that helps. If you do go with vi or emacs,
you'll probably need to learn Makefiles as well, MinGW comes with a
tool to use those.
 
C

Computer Whizz

Robert Zaleski said:
Dev-C++ does have a Linux version, but it's pretty much unusable. So
don't pick it because you think it will work on Linux. Also, if you're
looking for a Linux distro, gentoo.org is a one with good support for
home users.

I was basically going to write it first for Windows, then just edit the code
with an editor to fix any problems in Linux and compile with gcc...
SDL has been used in allot of projects and provides OGL support and all
the types of things you get from DirectX. It's at
http://www.libsdl.org

I'll look into it - thanks.
Also, gvim and emacs are good tools, but they're not really IDEs in the
sense that you are probably thinking of. I use Vi everywhere in fact.
They have some nice features for compiling and such, but it's more an
add on to a great console based editor. So using either one is gonna
be a steep curve for you if you go that route instead of with a more
common windows IDE. Hope that helps. If you do go with vi or emacs,
you'll probably need to learn Makefiles as well, MinGW comes with a
tool to use those.

I do hate makefiles... It got tedious turning the source into a .make and
then into an executable in Linux, when you're just learning it kind of puts
you off. That's why I went with VC++ 6... But even that way it isn't true
C++, and I wouldn't be able to port it well...
I don't mind having or not having IDE's really - it's just that they're a
great help a lot of the time. I generally use notepad for PHP stuff because
it's fast and simple... Still auto-indenting, text compression and another
couple of features I have in my head would be nice!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top