Dev-C++ "Could not create process"

After I successfully compile the following example taken from,
I get a "Could not create process" error message from Windows XP when I run the
corresponding .exe file. Can you tell me what it may mean? At one pont, WIndows XP declares it not to be a 32bit file. Your help will be much appreciated.


// basic file operations
#include <iostream>
#include <fstream>
using namespace std;

int main () {
ofstream myfile; ("example.txt");
myfile << "Writing this to a file.\n";
return 0;
First, and foremost, get rid of Dev-C++, it's no good. Even the better versions, Orwell and wxDev, I feel are severely lacking. As I understand, Orwells hasn't been updated for sometime again, and wxDev has been running into issues with their releases.

Secondly, there could be an issue with the compiler supplied, depending on the age of it. However, I couldn't even begin to guess why since you're using updated iostream and fstream headers. My guess is that something may have broken during installation.

If you're dead set on using Dev-C++, please try uninstalling it, restarting your computer, redownloading it, and reinstalling. If the issue persists, it could be due to an issue in your environment itself, I'd attempt a thorough virus scanning.

If you're not picky on your IDE, which you really shouldn't be since you probably haven't really learned how to use it yet, I'd suggest switching to something a little more up to date. I personally suggest Code::Blocks as do others on the forum. That and Microsoft Visual C++ are the most popular. MSVC++ has known issues and it hinders itself so that is why I suggest C::B. I'll provide a link below for all OS's, just find the link to Windows mingw-setup and download that. Install it and attempt to run your code again. If you still are having issues, it is directly related to your system and not the compiler or the IDE.
Last edited on
Agreed, as soon as someone says "Dev-C++", that's ALWAYS their problem.
Well, I just tried this code using two different compilers. One of which was Orwell Dev-C++.

The program compiled and executed without problem on both of them.

If there is any problem, it could be the way the system is configured, but there should be some error message issued during the build process to indicate what has gone wrong. Either that or the executable being run is a completely different program than the one just built. Check the timestamp of the exe file to confirm that it matches the time when you built it.

I should add that it's not my intention to particularly defend Dev-c++. Rather, I'm in favour of a logical approach to problem solving, such as checking the error messages and verifying the process step-by-step until a specific cause is found.
Last edited on
I'm running Dev C++ and have no problems. That is not your problem.

How are you running the file, from the C Prompt ?
What are you typing ?

Does the file name have any spaces or special charcters ?

Are you administrator ?

In the folder with your program type Dir and make sure the filename looks right.

make sure the file is not open in notepad or something.
Hi, Everyone,

Thank you very much for your good advice. Tonight I repeated my source file's compilation and execution after pasting the indicated text in Dev-C++'s source-file window. Much to my surprise, everything went fine and I could not recreate the
previous problem.

I am using Dev-C++ mainly because it happens to be the first user-friendly, complete C++ complier-debugger I've come across during the past few months.
I've experienced many problems trying to use Code::Blocks and Codelite on my Windows XP and Ubuntu 12.04 computers. Since I am still a C++ neophyte, I think Dev-C++ will fill my needs for a while until I become more proficient and advanced. Thanks to you all again.

Hi, Everyone,

Thank you very much for your kind help and good advice. I repeated my source file's compilation and execution tonight. Much to my surprise, everything went fine. I just could not repeat my earlier problem.

I am using Dev-C++ mainly because as a C++ neophyte, I like its completeness, simplicity and user-friendliness. However, I wish its compiler would show line numbers. I've recently tried Code::Blocks and Codelite on my Windows XP and UBuntu Linux computers and encountered many problems. Being a lazy and elderly retiree, I just follow the path of least resistance. Perhaps one day when I become more advanced, I'll venture out beyond Dev-C++.

Thanks again.

Last edited on
I'm glad the problem was resolved - even if you didn't find the cause. If you are using that particular compiler, it's worth mentioning the latest version can be found at

Unfortunately google seems to bring up results for an older version first, so it's easy to get misled.
Topic archived. No new replies allowed.