You can use an input function at the end of your source, like the following example:
int main()
{
system(“PAUSE”);
return 0;
}
When creating a console application, be sure to uncheck “Do not create a console” in Project Options (when working with source files only uncheck “Create for win32” in Compiler Options).
You most probably haven’t declared any main() function in your program
Install the missing DLL. You can find more information about this issue at this Microsoft support page
Check within Compiler Options if the directories settings are correct. For a default setup, you should have:
C:\DEV-C++\Bin\
c:\DEV-C++\Include\
c:\DEV-C++\Include\
c:\DEV-C++\Lib\
Go to Compiler Options and click on the Linker sheet. Now check "Generate debugging information". Do a "Rebuild All" and debugging should now be available
If you want to reduce your executable file size from 330Kb to 12Kb for example, go to Compiler Options, then click on the Linker page and uncheck "Generate debug information". This will remove debugging information (if you want to debug, uncheck it). You can also reduce even more by going to the Optimization page and checking "Best optimization".
The is because you are not in Administrator mode, and Dev-C++ tries to write to the registry. To get rid of the error message, log on as the Administrator, or uncheck the file association options in Environment options, Misc. Sheet.
Go to Compiler options, and check if the Lib directory is correctly set to:
C:\Dev-C++\Lib\
(for a default installation).
If this still doesn't work, try copying the file Lib\crt2.o to your Dev-C++'s Bin directory.
All the libraries that comes with hte installed Mingw release reside in the Lib directory. They are all named in the following way: lib[name].a
To link a library with your project, just add in Project options, Further option files:
-lopengl32
This is for including the libopengl32.a library. To add any other library, just follow the same syntax:
Type -l (L in lowercase) plus the base name of the library (filename without "lib" and the ".a" extension)
The Mingw compiler understands paths in the Unix style (/mydir/myfile.h). Replace the \ in the filename by /
A lot of different GUI libraries can be used with Dev-C++ and Mingw. Fore a few easy-to-install packages for Dev-C++, visit this page
Because conio.h is not part of the C Standard Library. 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.
If you really can't live without them, you can use conio 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.
On some screen exotic systems and resolutions, toolbar icons may show up incorrectly. Try changing your screen resolution, or disable toolbars from the View menu in Dev-C++
If you are willing to use the Setup Creator feature of Dev-C++ 4, you need to download and install this file
The "GNU as" assembler uses AT&T syntax (not Intel). Here's an example:
// 2 global variables
int AdrIO ;
static char ValIO ;
void MyFunction()
{
__asm("mov %dx, _AdrIO") ; // loading 16 bits register
__asm("mov %al, _ValIO") ; // loading 8 bits register
/*
Don't forget the underscore _ before each global variable names !
*/
__asm("mov %dx, %ax") ; // AX --> DX
}
#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 MS-DOS' pause command
return 0;
}
There was a Linux version, but it has been abandoned, mainly because Dev-C++ is written in Delphi, but the first Linux version of Delphi (Kylix) wasn't as promising as required for Dev-C++ to be ported.
Put in Project Options, Linker parameters: --def yourfile.def
Try to run Windows Update and make sure that you have the Program Compatability updates.
Some users reported that you need to apply several patches to your system. Here is the list of them, if you can retrieve them from Microsoft website:
47569us.exe - labeled as Windows98SE shutdown
dcom98.exe
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).