Author Topic: Choice of Compilers  (Read 2979 times)

0 Members and 1 Guest are viewing this topic.

I just checked out a copy of the source and and compiled it with MSVC7.0

Nothing special here.  It runs fine and about the same as the available binaries.

Then I had a thought.  What if another compiler was used?  How good would that be?



In any case, which compilers does the SCP team use for the win32 releases?



I've just downloaded an evaluation copy of the Intel Optimized Compiler 7.0 (not the evil 8.0 version which includes code to disable the optimizations for AMD processors) and just started to compile an exe specifically for SSE capable processors (AthlonXP, Pentium 3 and above).


Would this potentially be faster and useful for the 3.6 release?


Wow, ICC7 sure takes its time compiling.

 

Offline Inquisitor

I use VC6
No signature.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
do not use MSVC7 under any circumstances
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
hm... i should compile an FS2 open exec customized to my system.... see if i can any performance boost

[edit]

bah!@! i'd have to compile it on mingw32 or smiliar to get decent optimizations
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Tell me, why should I not use MSVC7.0?

The compiler is slightly closer to ANSI C++ (thus breaking a lot of VC6 code >< ) and it also features more optimizations than the VC6 compiler.




I've finished one compile of FS2_open using ICC7.0 but something is borked.  I've probably set the optimizations too agressive (either that, or the warning about a multiple definition was more serious than I thought).

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Well, the source doesn't seem to work with VCC 5.0...
-C

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
naturally not - use 6
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
I was going to be smart and use MSVC 7.1, well I got about 600 errors doing so.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
it's purported better ANSI C++

I have news for you - it's just thickened MS C++
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Give me a break, MS may have "thickened" it with a lot more of there own stuff, but that doesn't make it less ANSI compliant.

-----
The latest (Nov. 2003) issue of Dr Dobb's Journal has
an article on this very topic. According to that, the
top compilers for ISO comformance are:

Compiler     %Passed
-----------  -----------
edg 3.2      99.70
Comeau 4.3.2 99.55
Intel 7.1    99.55
PGCC 4.1-2   99.11
VC++7.1      98.22
gcc 3.3      96.14
Borland 6.0  92.73
Watcom 1.0   78.49

Of course, ISO conformance is just one among many
factors that you must consider when deciding which
compiler is best.
-----


In any case, VC6 code is much worse.

 
Too bad I can't compile it with GCC :(

(Uh, delete this. I just saw the list :P)

 
Hmmm, strange.

If I have this bit of code:

for (int i = 0; i < 50; ++i)
{
      //do something
}

i += 5;


where i isn't defined before the for loop, should that be illegal code (i.e. the variable i is local only to the for loop)?

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Yes it should be illegal code, VC has always violated for-loop variable locality

PS: almost nobody writes origional ANSI C++ anymore.. it's almost always one of the _much_ newer standards
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Hmm, well, I noticed an option in the VC7 compiler to force it to compliance and then it broke a bunch of code in the FS2_open source :weeps:

Which was why I was wondering.

 
FS2 is written in C++, right?
Isn't GNU C like ANSI C?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by Kazan
naturally not - use 6


Well, at the moment I've got $0 to use for purchases, due to the updates to my computer to keep it somewhere in the ballpark of "at par".

'Course, I guess I could also try that copy of the Introductory Edition I've got lying around somewhere. :rolleyes:

Isn't there some free, open-source alternative that doesn't require Linux?
-C

 
mingw32

The way you use GCC in windows.


Unfortunately I haven't been able to set it up properly yet, so if you manage it, do tell me how and save me the trouble :lol:


The Borland compiler is supposed to be free too (although it doesn't generate very well optimized code).  There's a few more that escapes me right now.
« Last Edit: April 09, 2004, 06:15:27 pm by 998 »

 
cygwin too

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
I just had to run the binary of msys, then extract gcc to a directory and it was *almost* working. (I didn't have binutils installed)

Then I made the mistake of moving it into the main bin directory and it won't work. :doubt:
-C

 
I mean to get it to compile FS2_open since I'm not familiar with the gcc compiler.  :sweatdrop: