I have been in and out of programming over the years and DevC++ has always been a favorite program of mine. Awhile ago, however (as in years), it stopped working and I stopped using it. I've come back to it recently and the same thing is happening, which I can't seem to figure out.
I have just been putting in simple code to try to figure out what's going on but I cannot for my life get the thing to compile. I entered a simple Hello World program:
When I press Compile for this, a dialog box for the compiling pops up for about a millisecond and then shuts again and nothing happens. When I go to the Compile Log, it reads "Total Errors: 1" under info and, in the actual log:
[code]Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Kyle\Desktop\C++\Basics\Hello World.cpp" -o "C:\Documents and Settings\Kyle\Desktop\C++\Basics\Hello World.exe"
Execution Terminated[/code]
Could anyone possibly shed some light on this? Any help would be great. Thank you.
Well, my suspicion is that you are running into an issue with spaces in the path to your code. As is mentioned in the thread titled "Please Read Before Posting a Question" (you did read that before asking, right? ;) it is a very bad idea to put your code in places with spaces in the path, like
C:\Documents and Settings\Kyle\Desktop\C++\Basics
I keep my code in a place named something like
c:\mycstuff
to avoid such issues.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not only the folder path but also the file name (Hello World.cpp) should not contain spaces.
This may not be your only problem, but first lest fix the problems we know about and can see and start from there. If it still does not work, besure to post the new log again (even if you think it says nothing new).
Is this computer the same one on which you previusly used Dev-C++?
Is this an old version of Dev-C++ or 4.9.9.2?
You compiler invocation does not look correct, there are no standard header file paths are specified, or other options normally set by default. This is indicative of a bad install, or an install over an older version so that it is using old and incompatible configuration files. The "PLEASE READ BEFORE POSTING A QUESTION" thread tells you how to deal with a reinstall to avoid such problems.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I dropped the file into C:/ as helloworld.cpp and it still has the exact same problem. Also, this is indeed the computer I used it on before, although I recently reformatted my hard drive so there shouldn't be any old version - new version overlap problems. And yes, I have version 4.9.9.2 of the software.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sigh - I said: "be sure to post the new log again (even if you think it says nothing new)".
I would suggest that the root of your boot drive is not a good choice either. The OS puts all sorts of files there. This is not your problem of course, it is just not a good idea.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I've made sure there's no trace of it at all and reinstalled and noticed something that is probably related to my problems, although I cannot understand it entirely. When I run Dev-Cpp, a dialog box opens that says:
There doesn't seem to be GNU Make file in PATH or in Dev-C++'s Bin path. Please make sure that you have GNU Make and adjust Bin setting or system PATH environment variable and that make settings in Compiler Option contains correct filename, otherwise you will not be able to compile anything.
Any translations? :p
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yep, got it. I wasn't aware that was the problem when I read the thread so that's why I didn't associate it with my woes. Terribly sorry. It works now though, so I'm very happy. Thanks for being patient, everyone. ;p
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been in and out of programming over the years and DevC++ has always been a favorite program of mine. Awhile ago, however (as in years), it stopped working and I stopped using it. I've come back to it recently and the same thing is happening, which I can't seem to figure out.
I have just been putting in simple code to try to figure out what's going on but I cannot for my life get the thing to compile. I entered a simple Hello World program:
[code]#include <iostream>
using namespace std;
int main(){
}[/code]
When I press Compile for this, a dialog box for the compiling pops up for about a millisecond and then shuts again and nothing happens. When I go to the Compile Log, it reads "Total Errors: 1" under info and, in the actual log:
[code]Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Kyle\Desktop\C++\Basics\Hello World.cpp" -o "C:\Documents and Settings\Kyle\Desktop\C++\Basics\Hello World.exe"
Execution Terminated[/code]
Could anyone possibly shed some light on this? Any help would be great. Thank you.
-Kyle
Related
Code: code
Well, my suspicion is that you are running into an issue with spaces in the path to your code. As is mentioned in the thread titled "Please Read Before Posting a Question" (you did read that before asking, right? ;) it is a very bad idea to put your code in places with spaces in the path, like
C:\Documents and Settings\Kyle\Desktop\C++\Basics
I keep my code in a place named something like
c:\mycstuff
to avoid such issues.
Wayne
Not only the folder path but also the file name (Hello World.cpp) should not contain spaces.
This may not be your only problem, but first lest fix the problems we know about and can see and start from there. If it still does not work, besure to post the new log again (even if you think it says nothing new).
Is this computer the same one on which you previusly used Dev-C++?
Is this an old version of Dev-C++ or 4.9.9.2?
You compiler invocation does not look correct, there are no standard header file paths are specified, or other options normally set by default. This is indicative of a bad install, or an install over an older version so that it is using old and incompatible configuration files. The "PLEASE READ BEFORE POSTING A QUESTION" thread tells you how to deal with a reinstall to avoid such problems.
Clifford
Well, I dropped the file into C:/ as helloworld.cpp and it still has the exact same problem. Also, this is indeed the computer I used it on before, although I recently reformatted my hard drive so there shouldn't be any old version - new version overlap problems. And yes, I have version 4.9.9.2 of the software.
sigh - I said: "be sure to post the new log again (even if you think it says nothing new)".
I would suggest that the root of your boot drive is not a good choice either. The OS puts all sorts of files there. This is not your problem of course, it is just not a good idea.
Clifford
Ok, I've made sure there's no trace of it at all and reinstalled and noticed something that is probably related to my problems, although I cannot understand it entirely. When I run Dev-Cpp, a dialog box opens that says:
There doesn't seem to be GNU Make file in PATH or in Dev-C++'s Bin path. Please make sure that you have GNU Make and adjust Bin setting or system PATH environment variable and that make settings in Compiler Option contains correct filename, otherwise you will not be able to compile anything.
Any translations? :p
This EXACT question is answered in the thread titled "Please Read Before Posting a Question".
Wayne
I didn't see it there.
Copying directly from the thread:
SOME COMMON PROBLEMS, ANSWERS and HOW-TO's
(0) A simple example of "Hello World"
http://sourceforge.net/forum/forum.php?thread_id=1036487&forum_id=48211
(1) Getting a message about Dev not being able to find Gnu Make?
http://sourceforge.net/forum/forum.php?thread_id=1347626&forum_id=48211
See it now? ;)
Wayne
Getting mad at me for giving you a hard time yet?
Please note that there is one other place you don't want to put your code.
That is directly in the dev directory.
Seriously, I do keep my stuff in
c:\mycstuff
Fell free to keep yours in
c:\stuffitwayne
just avoid the use of !
Wayne
Yep, got it. I wasn't aware that was the problem when I read the thread so that's why I didn't associate it with my woes. Terribly sorry. It works now though, so I'm very happy. Thanks for being patient, everyone. ;p