Source File Not Compiled Dev C++ Windows 10

Posted on  by admin
Source File Not Compiled Dev C++ Windows 10 Average ratng: 8,6/10 866 reviews

Dev-C++ FAQs

Source file not compiled Dev C. Ask Question Asked 6 years, 11 months ago. However on Windows 7 you need the older version of it which is devcpp- Download it from the link and use it. Download uphoria vst free. Does pro tools 8 have auto tune. (Don't forget to uninstall any other version already installed on your.

When executing my console program, it closes automatically. How I can change this behavior?

You can use an input function at the end of your source, like the following example:

int main()
return 0;

When I compile my dos program and execute it, Dev-C++ minimizes and then restore in a second but nothing appears

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).

After linking, I get the error “C:DEV-C++LIBlibmingw32.a(main.o)(.text+0x8e): undefined reference to `[email protected]'

You most probably haven’t declared any main() function in your program

When I launch Dev-C++ i get the message saying “WININET.DLL not found”

Install the missing DLL. You can find more information about this issue at this Microsoft support page

When I compile a file, I get a message saying 'could not find <filename>'

Check within Compiler Options if the directories settings are correct. For a default setup, you should have:

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 debugging should now be available

The EXE files created are huge. What can I do to reduce the size?

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'.

Under Windows NT, every time i launch Dev-C++ i get the message “Failed to set data for”

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.

When I try to compile I get: ld: cannot open crt2. o: No such file or directory. What can i do?

Go to Compiler options, and check if the Lib directory is correctly set to:
(for a default installation).

If this still doesn't work, try copying the file Libcrt2.o to your Dev-C++'s Bin directory.

How can I use the OpenGL library and others?

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:

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)

When I compile a file containing references to Windows filename (like <Mydirmyfile.h>), I get an 'unrecognized escape sequence' message ?


The Mingw compiler understands paths in the Unix style (/mydir/myfile.h). Replace the in the filename by /

Is there any GUI library or packages available for Dev-C++?

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

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

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++Libconio.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.

Toolbar icons are not showing properly

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++

When attempting to create a setup program, i get the error 'File BinSetup.exe not found'

If you are willing to use the Setup Creator feature of Dev-C++ 4, you need to download and install this file

How to use assembly with Dev-C++?

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

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 MS-DOS' pause command
return 0;

What about a Linux version?

Source File Not Compiled Dev C++ Windows 10 Download

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.

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.

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, if you can retrieve them from Microsoft website:
47569us.exe - labeled as Windows98SE shutdown
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).

What is Dev-C++?
Dev-C++, developed by Bloodshed Software, is a fully featured graphical IDE (Integrated Development Environment), which is able to create Windows or console-based C/C++ programs using the MinGW compiler system. MinGW (Minimalist GNU* for Windows) uses GCC (the GNU g++ compiler collection), which is essentially the same compiler system that is in Cygwin (the unix environment program for Windows) and most versions of Linux. There are, however, differences between Cygwin and MinGW; link to Differences between Cygwin and MinGW for more information.

Click picture to enlarge.

I'll be the first to say that the name Bloodshed won't give you warm and fuzzies, but I think it's best if the creator of Bloodshed explains:

First I would like to say that I am not a satanist, that I hate violence/war and that I don't like heavy metal / hard-rock music. I am french, but I do know the meaning of the 'Bloodshed' word, and I use this name because I think it sounds well. If you are offended by the name, I am very sorry but it would be a big mess to change the name now.

There's also a reason why I keep the Bloodshed name. I don't want people to think Bloodshed is a company, because it isn't. I'm just doing this to help people.

Here is a good remark on the Bloodshed name I received from JohnS:
I assumed that this was a reference to the time and effort it requires of you to make these nice software programs, a la 'Blood, Sweat and Tears'.

Peace and freedom,

Colin Laplace

Getting Dev-C++
The author has released Dev-C++ as free software (under GPL) but also offers a CD for purchase which can contain all Bloodshed software (it's customizable), including Dev-C++ with all updates/patches.

Link to Bloodshed Dev-C++ for a list of Dev-C++ download sites.

You should let the installer put Dev-C++ in the default directory of C:Dev-Cpp, as it will make it easier to later install add-ons or upgrades.

Using Dev-C++
This section is probably why you are here.

All programming done for CSCI-2025 will require separate compilation projects (i.e. class header file(s), class implementation file(s) and a main/application/client/driver file). This process is relatively easy as long as you know what Dev-C++ requires to do this. In this page you will be given instructions using the Project menu choice. In another handout you will be given instructions on how to manually compile, link and execute C++ files at the command prompt of a command window. See here.

Step 1: Configure Dev-C++.
We need to modify one of the default settings to allow you to use the debugger with your programs.

  • Go to the 'Tools' menu and select 'Compiler Options'.
  • In the 'Settings' tab, click on 'Linker' in the left panel, and change 'Generate debugging information' to 'Yes':
  • Click 'OK'.

Step 2: Create a new project.
A 'project' can be considered as a container that is used to store all the elements that are required to compile a program.

  • Go to the 'File' menu and select 'New', 'Project...'.
  • Choose 'Empty Project' and make sure 'C++ project' is selected.
    Here you will also give your project a name. You can give your project any valid filename, but keep in mind that the name of your project will also be the name of your final executable.
  • Once you have entered a name for your project, click 'OK'.
  • Dev-C++ will now ask you where to save your project.

Step 3: Create/add source file(s).
You can add empty source files one of two ways:

  • Go to the 'File' menu and select 'New Source File' (or just press CTRL+N) OR
  • Go to the 'Project' menu and select 'New File'.
    Note that Dev-C++ will not ask for a filename for any new source file until you attempt to:
    1. Compile
    2. Save the project
    3. Save the source file
    4. Exit Dev-C++

You can add pre-existing source files one of two ways:
  • Go to the 'Project' menu and select 'Add to Project' OR
  • Right-click on the project name in the left-hand panel and select 'Add to Project'.
EXAMPLE: Multiple source files
In this example, more than 3 files are required to compile the program; The 'driver.cpp' file references 'Deque.h' (which requires 'Deque.cpp') and 'Deque.cpp' references 'Queue.h' (which requires 'Queue.cpp').

Step 4: Compile.
Once you have entered all of your source code, you are ready to compile.

  • Go to the 'Execute' menu and select 'Compile' (or just press CTRL+F9).

    It is likely that you will get some kind of compiler or linker error the first time you attempt to compile a project. Syntax errors will be displayed in the 'Compiler' tab at the bottom of the screen. You can double-click on any error to take you to the place in the source code where it occurred. The 'Linker' tab will flash if there are any linker errors. Linker errors are generally the result of syntax errors not allowing one of the files to compile.

Once your project successfully compiles, the 'Compile Progress' dialog box will have a status of 'Done'. At this point, you may click 'Close'.

Step 5: Execute.
You can now run your program.

  • Go to the 'Execute' menu, choose 'Run'.
Note: to pass command-line parameters to your program, go to the 'Execute' menu, choose 'Parameters' and type in any paramaters you wish to pass.

Disappearing windows
If you execute your program (with or without parameters), you may notice something peculiar; a console window will pop up, flash some text and disappear. The problem is that, if directly executed, console program windows close after the program exits. You can solve this problem one of two ways:

  • Method 1 - Adding one library call:
    On the line before the main's return enter:
  • Method 2 - Scaffolding:
    Add the following code before any return statement in main() or any exit() or abort() statement (in any function):
    /* Scaffolding code for testing purposes */
    cin.ignore(256, 'n');
    cout << 'Press ENTER to continue...'<< endl;
    /* End Scaffolding */
    This will give you a chance to view any output before the program terminates and the window closes.
  • Method 3 - Command-prompt:
    Alternatively, instead of using Dev-C++ to invoke your program, you can just open an MS-DOS Prompt, go to the directory where your program was compiled (i.e. where you saved the project) and enter the program name (along with any parameters). The command-prompt window will not close when the program terminates.

For what it's worth, I use the command-line method.

Step 6: Debug.
When things aren't happening the way you planned, a source-level debugger can be a great tool in determining what really is going on. Dev-C++'s basic debugger functions are controlled via the 'Debug' tab at the bottom of the screen; more advanced functions are available in the 'Debug' menu.

Using the debugger:
The various features of the debugger are pretty obvious. Click the 'Run to cursor' icon to run your program and pause at the current source code cursor location; Click 'Next Step' to step through the code; Click 'Add Watch' to monitor variables.
Setting breakpoints is as easy as clicking in the black space next to the line in the source code.
See the Dev-C++ help topic 'Debugging Your Program' for more information.

Dev-C++ User F.A.Q.

Why do I keep getting errors about 'cout', 'cin', and 'endl' being undeclared?
It has to do with namespaces. You need to add the following line after the includes of your implementation (.cpp) files:

How do I use the C++ string class?
Again, it probably has to do with namespaces. First of all, make sure you '#include <string>' (not string.h). Next, make sure you add 'using namespace std;' after your includes.


That's it for now.
I am not a Dev-C++ expert by any means (in fact, I do not teach C++ nor use it on a regular basis), but if you have any questions, feel free to email me at [email protected]

Happy coding!