The Dev-C++ Resource Site

Navigation:

Note: you may want to checkout the official Dev-C++ 4 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. After linking, i get an error like C:\DEV-C++\LIB\\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16'
  5. How can i provide a .def file for my DLL ?
  6. I am having strange problems under Windows XP
  7. How do i enable Debugging mode ?
  8. When I launch Dev-C++ i get the message saying 'WININET.DLL' or 'MSCVRT.DLL' not found
  9. The size of the executable generated is huged, why ?
  10. How to use assembly with Dev-C++ ?
  11. I am using Windows 98 and I cannot compile


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 "Linker Options" 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 ("pause"); // 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. ;-)

After linking, i get an error like C:\DEV-C++\LIB\\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16'

You probably haven't declared any main() or WinMain() function in your program.

How can i provide a .def file for my DLL ?

Put in Project Options, Linker parameters : --def yourfile.def

I am having strange problems under Windows XP

Try to run Windows Update and make sure that you have the Program Compatability updates.

How do i enable Debugging mode ?

Go to Compiler Options and click on the Linker sheet. Now check 'Generate debugging information'. Do a 'Rebuild All' and you should be able to debug now

When I launch Dev-C++ i get the message saying 'WININET.DLL' or 'MSCVRT.DLL' not found

You are missing a Windows DLL, which you can download here

The size of the executable generated is huged, why ?

Be sure you didn't check "Generate debugging information" in Compiler Options, Linker sheet

How to use assembly with Dev-C++ ?

The "GNU as" assembler uses AT&T syntax (not Intel). Check out this page for more information.
Here's an example of such a syntax :

// 2 global variables
int AdrIO;
static char ValIO;

void MyFunction(..........)
{
__asm("mov _AdrIO, %dx") ; // loading 16 bits register
__asm("mov _ValIO, %al") ; // loading 8 bits register
/*
Don't forget the underscore _ before each global variable names !
*/
__asm("mov %ax,%dx") ; // AX --> DX
}

I am using Windows 98 and I cannot compile

Some users reported that you need to apply several patches to your system. Here is the list of them, they can be found on Microsoft Windows 98 download site

47569us.exe - labeled as Windows98SE shutdown
dcom98.exe - see also http://www.microsoft.com/com/dcom/dcom98/dcom1_3.asp
DX81eng.exe - latest version of DirectX (this is 11MB, and cannot be uninstalled without reinstalling Windows 98. You might want to try this one last in case the other above didn't work, as it should update many parts of the system).

No patents in Europe Images by The GIMP