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.
This System uses GCC Compiler version 2.95
Moderator: Board moderators
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
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
Best reagrds
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)
-
- Experienced poster
- Posts: 145
- Joined: Sat Feb 23, 2002 2:00 am
- Location: Paris, France
- Contact:
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.
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.
-
- New poster
- Posts: 22
- Joined: Sun Oct 20, 2002 6:41 pm
- Location: Lithuania
- Contact:
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).Dominik Michniewski wrote:I use many times <math.h> in my programs and always get proper result, never Compile Error
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
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


Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)
-
- Learning poster
- Posts: 90
- Joined: Sat Feb 15, 2003 1:39 am
- Location: Paris, France
- Contact:
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
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.
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.
-
- Experienced poster
- Posts: 145
- Joined: Sat Feb 23, 2002 2:00 am
- Location: Paris, France
- Contact:
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 ?
That's really annoying....
If anybody knows a doc listing the differences, plz could you post here the URL ?