Sign in to follow this  
Q-Parser

What's wrong with my Dev-C++?

Recommended Posts

Ok, I started a new project in C. The default code is:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  
  system("PAUSE");	
  return 0;
}
But it didn't compile! I got message "unable to run program file". Could anybody help me with this? Thanks!

Share this post


Link to post
Share on other sites
I did so, but nothing changed. I can't understand it. Whatever program I did I know about that it worked suddenly doesn't work!
That's weird. Maybe I shoud reistall it...

Share this post


Link to post
Share on other sites
There isn't any except for that I already mentioned. In a line column of compiler output is number 2. However this is output for all programs.

Compiler log:

Compiler: Default compiler
Building Makefile: "D:\Dev-Cpp\Projects\Makefile.win"
Executing make...
make.exe -f "D:\Dev-Cpp\Projects\Makefile.win" all
Execution terminated

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
...
make.exe -f "D:\Dev-Cpp\Projects\Makefile.win" all
Execution terminated

hmm... if it's teriminated, then it didn't build, hmmm...

Share this post


Link to post
Share on other sites
Okay maybe this is a stupid question but....
Are you trying to write to a read only drive?

I accidentally left the write protection switch on on my key drive once then tried to compile something on it and got a similar warning.

Share this post


Link to post
Share on other sites
I've heard that installing it to a path that has spaces will cause that. An example is C:\Program Files\DevCpp. So installing it to C:\DevCpp should fix it.

Edit:
Hmmm, I just noticed that you have no spaces in where it's installed for you. So, what I said is useless. Unless, you remove the -? I doubt it though.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ainokea
acually I just had the same problem with the new version. Now you have to install it to a path with spaces!


Forget what I said then. Had it completely backwards.

Share this post


Link to post
Share on other sites
Quote:
Original post by j0seph


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{

system("PAUSE");
return 0;
}



try:

#include <stdio>
#include <stdlib>

int main(int argc, char *argv[])
{

system("PAUSE");
return 0;
}
[/code]
note the .h is missing

Share this post


Link to post
Share on other sites
see if the .exe file is still where it is supposed to be. If there is one, and you can't manually delete it, you may want to check ye olde Task Manager. If there isn't one, please disregard my entire existence.

Share this post


Link to post
Share on other sites
Quote:
Original post by K88soft
Quote:
Original post by j0seph


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{

system("PAUSE");
return 0;
}



try:

#include <stdio>
#include <stdlib>

int main(int argc, char *argv[])
{

system("PAUSE");
return 0;
}
[/code]
note the .h is missing


That isn't matter! It's a C code and not C++. In C you have to use .h!

Ok, I've tried to delete makefiles, remove .exe, and any other built programs wasn't running. Well, thanks guys for your effort. I'll try to reinstall it and then I'll be wiser (maybe).

Share this post


Link to post
Share on other sites
I just tryed the code and it works fine. what Dev-C++ did you download? the 7MB one or the 2MB one?

If you downloaded the 2MB one then you dont have the compiler to compile the code so you need to download the 7MB one.

Also my Dev-C++ is located at C:\Dev-C++\ and its the latest version.

And also make sure you are saveing it a .c and not .cpp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this