PDA

View Full Version : Best C++ linux compiler



Shuttleu
05-29-2009, 07:41 AM
from this thread http://villavu.com/forum/showthread.php?t=45860 i want to see idf there is a better C++ linux compiler then g++
what is the best c++ linux compiler?

~shut

EDIT: problem solved
but now i have a new problem
http://pastebin.com/m3ea0a02e
inside the function it says the array is 4 bytes in size which is wrong
and out side the function it says the array is 48 bytes in size which is correct
what i want to know is where has it gone wrong and why is it only saying it is 4 bytes big instead of 48 bytes?
because im sure i have put the array into the function correctly

Wizzup?
05-29-2009, 07:44 AM
It's generally just best to stick to g++.

Shuttleu
05-29-2009, 07:45 AM
so what do you think is wrong then in the other thread?

~shut

Smartzkid
05-29-2009, 10:48 AM
Ever tried the intel compilers?

I'm pretty sure you can get the linux ones for free.

rogue poser
05-29-2009, 12:46 PM
just do what i do and link code:blocks to g++ so you have a nice ide to work in similar to... well any mainsteam compiler and ide. its it really the compiler your worried about, or is it the ide? i mean your not tryng to make processor or hardware dependant calls are you?? :-p

current running that setup on a fedora 10 and an ubuntu 8.04, works great

Wizzup?
05-29-2009, 06:46 PM
so what do you think is wrong then in the other thread?

~shut

Judging from the time of this post, I think you have found your problem. :)

Shuttleu
05-30-2009, 04:03 AM
yes i found my problem thanks
but now i have a new problem
i will post it in the first post

~shut

ShowerThoughts
05-30-2009, 04:15 AM
My friend, I used to ask my questions here also.
try the egghead forums or something this is just not the right place you get some feedback but on other forums you get more feedback.

void001
11-15-2009, 03:50 PM
intel is fastest

fronty
11-15-2009, 04:04 PM
Necro(mancy|philia)?

boberman
11-15-2009, 08:54 PM
First off, compiler reviews are sprace, and for a good reason, different compilers will create code that is fast on one system, but slow on another. Not only that, the same code in two compilers will have different speeds. In some cases, gcc will be the fastest, in other, the microsoft compiler will be faster. It all depends on multiple factors.

With that in mind. Generally, for an intel system, the intel compiler is viewed as producing the best code with all optimizations turned on. However, the distance between the icc and the gcc is pretty minimal. with the latest gcc 4.4, there is almost no difference in the speed of code produced by either the icc or gcc (with the right flags turned on).

What compiler you use is really your last concern, your first should be what algorithm you are using. The best compiler in the world can't change the fact that a bubble sort sucks.

The difference between the top three compilers, gcc, Microsoft's compiler, and the icc is slim to none, and it depends heavily on the code being compiled. (icc isn't always the fastest)

fronty
11-15-2009, 09:20 PM
And if you plan to ship the program with source code, you pretty much have to let people use gcc when building the program without any modifications in build system if you don't want to get lots of complaints and patches about it.

boberman
11-16-2009, 01:43 AM
And if you plan to ship the program with source code, you pretty much have to let people use gcc when building the program without any modifications in build system if you don't want to get lots of complaints and patches about it.

If you use a standard autoconfig build system, this really isn't an issue. Intel's ICC and the GCC perform very similarly as far as syntax and even setting options goes. There are many people that have been able to successfully build their entire systems using the ICC.

If you are using just a simple make file build system, then I would agree that using that it would be wise to use the GCC as the standard compiler.

fronty
11-16-2009, 01:50 PM
And of course if you use just basic flags they are same on most compilers.

autoconf is painful to use. :s And it's GNU's.