The Dev-C++ Resource Site

Navigation:

Note: you may want to checkout the official Dev-C++ FAQ (or it's mirror).

FAQ

  1. Why can't I use conio.h functions like clrsrc()?
  2. How do I emulate the MS-DOS pause function?
  3. What about a Linux version?
  4. Why is this FAQ so small?


Why can't I use conio.h functions like clrsrc()?

Because conio.h is not part of the C standard. It is a Borland extension, and works only with Borland compilers (and perhaps some other commercial compilers). Dev-C++ uses GCC, the GNU Compiler Collection, as it's compiler. GCC is originally a UNIX compiler, and aims for portability and standards-compliance.

If really can't live without them, you can use Borland functions this way:
Include conio.h to your source, and add C:\Dev-C++\Lib\conio.o to "Further Object Files" in Project Options (where C:\Dev-C++ is where you installed Dev-C++).
Please note that conio support is far from perfect. I only wrote it very quickly.

How do I emulate the MS-DOS pause function?

There are two ways. You can do it this way:

#include <stdio.h>

int main()
{
  printf ("Press ENTER to continue.\n");
  getchar (); // wait for input
  return 0;
}

Or this way:

#include <stdlib.h>

int main()
{
  system (""); // execute M$-DOS' pause command
  return 0;
}

What about a Linux version?

There was a Linux version, but it has been abandoned, mainly because Dev-C++ is written in Delphi, but the Linux version of Delphi (Kylix) wasn't as promising as it should have been. But there are excellent alternative IDEs for Linux, such as KDevelop and Anjuta. If I have to choose between those two, I would choose for Anjuta. Though personally I don't use an IDE at all, just messing around with 3 terminals and gEdit with autoident. ;-)

Why is this FAQ so small?

Probably because it's still in construction. Who knows.

No patents in Europe Images by The GIMP