Note: you may want to checkout the official Dev-C++ 4 FAQ (or it's mirror).
- Why can't I use conio.h functions like clrsrc()?
- How do I emulate the MS-DOS pause function?
- What about a Linux version?
- After linking, i get an error like C:\DEV-C++\LIB\\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16'
- How can i provide a .def file for my DLL ?
- I am having strange problems under Windows XP
- How do i enable Debugging mode ?
- When I launch Dev-C++ i get the message saying 'WININET.DLL' or 'MSCVRT.DLL' not found
- The size of the executable generated is huged, why ?
- How to use assembly with Dev-C++ ?
- I am using Windows 98 and I cannot compile
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
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.
There are two ways. You can do it this way:
Or this way:
printf ("Press ENTER to continue.\n");
getchar (); // wait for input
system ("pause"); // execute M$-DOS' pause command
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
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. ;-)
You probably haven't declared any main() or WinMain() function in your program.
Put in Project Options, Linker parameters : --def yourfile.def
Try to run Windows Update and make sure that you have the Program Compatability updates.
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
You are missing a Windows DLL, which you can download here
Be sure you didn't check "Generate debugging information" in Compiler Options, Linker sheet
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
static char ValIO;
__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
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).