tags:

views:

156

answers:

1

My university is hosting a Programming Competition, and have decided to support Turbo C (the 16-bit DOS version) as a valid programming environment. I have just read that PC^2, the software that is going to be used to auto-judge the competition, does not support 16-bit programs.

So, is there any alternative to Turbo C that I can use. I need the same header files, and the compiler would need to support all the outdated C standards that Turbo C supports. But the output needs to be 32-bit. Is there any compiler that can satisfy these conditions?

+4  A: 

Portable C programs can be written in many different free compilers and non-free compilers.

For compatibility, you can't go wrong with gcc on Linux machines. If it doesn't work with GCC, you probably have a problem.

In Windows, the Microsoft C compiler is generally considered acceptable, but if you use MS Visual Studio (most schools have an installation) then you need to be very careful to ensure that you are compiling as ANSI-C, rather than later versions of C or even C++. When I used to teach, students used to miss that option, leading to problems with automated tests. Here are some instructions on how to do this with Visual Studio 2005, you can find similar features in later versions.

Uri
I'm willing to go with gcc, since configuring is the easiest with command line options. But does it support all of the header files that came with Turbo C, like conio.h? I just ask because I tried to do that when I first went from Turbo C to gcc and had problems with a number of header files. And conio.h is not part of the ANSI-C standard if I remember correctly?
Asad Jibran Ahmed
@Asad you're using `conio`!? That's a DOS header file.
Earlz
I suggest you go back and learn Standard C and maybe some nice libraries like ncurses and pthreads. "We're not in Real Mode anymore!"
Earlz
@Earlz: like I said, not an ANSI-C header file. And I don't think you read the question right. I'm not using conio. The contestants for the programming competition are. I'm trying to find an alternative compiler that can work with PC^2 by compiling to 32-bit.
Asad Jibran Ahmed