Page 1 of 1

This System uses GCC Compiler version 2.95

Posted: Wed Jul 23, 2003 10:37 am
by mhacm
I think this system uses GCC Compiler version 2.95. Well there are some differences with the new versio 3.22 available but using Linux is the best option if one wants to be safe from Compile Error. However Cygwin always works unless one decides to use capital letter to denote the library files to be imported.

Such as <MATH.H> will cause a Compile Error in the System but not in Cygwin and so <math.h> should be the accepted standard.

Using this command in Cygwin usually suffices

gcc -o Sample Sample.coo -Wall -ansii for C codes

and g++ for C++ codes.

I am still waiting for the very day when the system will prefer to Use Sun Microsystems Java JDK rather than GCJ Java Compiler by GNU. GCJ is giving me hard time as I don't want to use Linux always just to write a Java code which is just ..... unbearable.

Posted: Wed Jul 23, 2003 1:24 pm
by Dominik Michniewski
I use many times <math.h> in my programs and always get proper result, never Compil Error .... Maybe you use function wihich isn't in ANSI standard, but it's included in math.h ?

Best reagrds
DM

Posted: Wed Jul 23, 2003 6:25 pm
by Julien Cornebise
Hi
gcj is avalaible as "candidate release" (ie still under testing) under Windows using MinGW (http://www.mingw.org ), wich is a concurrent to cygwin. I haven't tried it, but I though you might be interested.

Posted: Wed Jul 23, 2003 7:09 pm
by Viktoras Jucikas
Dominik Michniewski wrote:I use many times <math.h> in my programs and always get proper result, never Compile Error
In UNIX environments file paths are case sensitive, so math.h and MATH.H are not the same (I guess this was what mhacm meant). As Cygwin works under win32 it probably uses win32 file system routines so there is no difference (and it is not Cygwins' fault).

Posted: Thu Jul 24, 2003 8:06 am
by Dominik Michniewski
Victoras, you have right. But I think, that anyone , who write programs in C/C++ know, that case of letters is important :):) not only in header names but in whole code :)

Best regards
DM

Posted: Thu Jul 24, 2003 10:50 am
by bery olivier
Moreover I find it suprising to try to use upper case letters for headers...
Image

Posted: Sat Jul 26, 2003 3:29 am
by Krzysztof Duleba
The fact that the system is running under g++ 2.95 was not a big surprise to me.
However, I didn't expect the big difference between g++ 2.95 and g++ 3.2 . At home I compile my code just typing make, which uses g++ 3.2 . Once I submited a code which was well tested, but got WA. To be sure about everything I compiled it with g++-2. The same code, with the same input files, produced different answers, depending on the compiler. I found that a line which looked like

while(next(it)!=verticles.end())
if(leftside(*it, *(next(it++)), p))return false;

was the reason for that mess. I changed it into

while(next(it)!=verticles.end())
{
if(leftside(*it, *(next(it)), p))return false;
it++;
}

and since then I got the same answer from executables created with both compilers, and AC as well :-)
(it is a local variable and is not used after that loop).

If someone wants to check it out, I can place my code somewhere.

Posted: Sat Jul 26, 2003 2:37 pm
by Julien Cornebise
Differences between 2.95 and 3.2 are a real pain in the neck, in my opinion. Have you tried to use hashmaps and stuff like that ? namespaces aren't the same , and include files hierarchy is really different.
That's really annoying....
If anybody knows a doc listing the differences, plz could you post here the URL ?