Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: ChronoReverse on April 08, 2004, 05:43:51 pm
-
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.
-
I use VC6
-
do not use MSVC7 under any circumstances
-
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
-
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).
-
Well, the source doesn't seem to work with VCC 5.0...
-
naturally not - use 6
-
I was going to be smart and use MSVC 7.1, well I got about 600 errors doing so.
-
it's purported better ANSI C++
I have news for you - it's just thickened MS C++
-
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)?
-
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
-
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?
-
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?
-
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.
-
cygwin too
-
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:
-
I mean to get it to compile FS2_open since I'm not familiar with the gcc compiler. :sweatdrop:
-
C++ code (and with C code) should be compiled with g++.
C code should be compiled with gcc.
If mistaken, correct me. New with C here too :)
-
WMCoolmon... did you get my private message