Jump to content

Different compilers

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
Are there any C++ compiles that are better than others? I used to think they were all the same, but one time I tried to compile a simple piece of code I wrote with one compiler and it didn't work, but then it did with another. Could someone explain that (and my original question)?

#2
MrDiaz

MrDiaz

    Learning Programmer

  • Members
  • PipPipPip
  • 65 posts
well fairly simple, compilers do make a difference and I will explain why really quickly here.

One thing that you need to take into account is the age of the compiler (the date it was created) . Today'ss compilers have substantial improvement over old compilers. Algorithms are optimized and some other factors as well, therefore, there is a difference on the compilers you use. Try switching compilers and you will be the different results, until you find one that suits you better.

I do not program in C++ so I cannot suggest one good compiler, although I think Borland C++ already comes with one and it has to be excellent since it is one of the best tools used by developers.

#3
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
I've used Dev C++, and something happened to me that was similar to Kaabi. I got a book on C++ and tried the code, and it didn't work! But then when I saw a tutorial online, the code was different, and I tried that and it worked. Wasted a lot of money on the book, though.

#4
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Mostly those types of problems aren't related to the compiler, but the target platform or "standard" libraries (your C++ book may have expected the GNU libs, but they aren't standard on Windows). Compiler differences generally boil down to different optimization methods, and other tricks. I don't do C/C++ much anymore, but everyone tells me Intel's compiler is the fastest (it's also pretty expensive). I generally stick with the GNU compiler, Microsoft's Visual C++, or SCO's compiler when I'm unlucky enough to be in that environment without GNU tools.

#5
Guest_Axter_*

Guest_Axter_*
  • Guests
>>I think Borland C++ already comes with one and it has to be excellent since
>>it is one of the best tools used by developers.

I recommend against using Borland C++ compiler.
It has poor compliance to the C++ standard.
The free GNU 3.x/4.x C++ compiler is far more compliance to the C++ standard, and it comes with Dev C++ which is a free C++ IDE.
http://www.bloodshed.net

The MS VC++ 8.0 compiler also has very good compliance, and you can get a free version via following link:
http://msdn.microsof...vstudio/express

#6
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
Yes, as I said, Dev C++ was the version of C++ I got. I think I deleted it or something, well, I can't find it.

#7
Guest_snxster_*

Guest_snxster_*
  • Guests
I like microsoft visual c++ 6.0 better then most compilers but dev c++ is good and free!

#8
Guest_Estupido_*

Guest_Estupido_*
  • Guests
dev c++ is definitely much better than using plain shell login for university computers. my roommate thanked me kindly after helping him discover it after 3 years of programming without.

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
When you're comparing compilers, you have to be careful to seperate it from the IDE. GNU (and thus MinGW) are good about being standards compliant. MS and Intel are also good. There are some others out there as well, such as Comeu (sp?) that are reported to be very good.

IDEs often bring along additional libraries that have nothing to do with the standard at all, but give you additional functionality such as .NET, COM, CLI, and others. For myself, I recently downloaded SmartWin++ and will be using that for GUI development. Anything GUI is NOT part of standard C++.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
icepack

icepack

    Programmer

  • Members
  • PipPipPipPip
  • 115 posts
blah visual

emacs/vim & g++

#11
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
I've certainly learned a lot, coming from when I used to think all compilers were the same (very early on).

#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
assert(vim>emacs);
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog