g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
4) Some background information
This is a fresh, clean install. The one before it had the same problem, but I had installed it to C:\cpp, so I decided to try the default path instead, after making sure to cleanly uninstall that version (ran C:\cpp\uninstall.exe), deleting the cpp folder, and then deleting the two hidden devcpp files and the devcpp folder in the local settings folder. Rebooted, redownloaded installer, installed to default directory. Problem persists.
This is a strange error because main.cpp is right where it says it isn't, I'm looking at it with my own two eyes.
Also, if it serves any interest, I did add C:\Dev-Cpp\bin to the path environmental variable, and typing "g++" in a command prompt results in "g++: no input files" as is expected.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seeing as I already have Eclipse for Java and am familiar with it, I think the CDT plug-in sounds the most appealing. Thank you very much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-08
There is an apparent bug in Dev-C++ that causes this to occur when projects are kept in a subfolder of teh Dev-C++ installation folder. Weird but true! I thought everyone else just had bad set-ups until t happend to me one day when I was just too lazy to navigate to a new folder!
Simply place your project in c:\dev\projects for example. It is not really good practice in any case to 'pollute' the program installation with user files (IMO). It may make make upgrades, uninstalls, and reinstallations problematic.
Hope it works for you. It seems ot have solved the same problem for others, and myself.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, but that didn't solve the problem.
I deleted C:\Dev-Cpp\Projects (just the Projects folder) and created C:\dev and C:\dev\projects. I then re-opened Dev-C++ and started a new Project and saved it in the newly createc C:\dev\projects folder, and likewise saved main.cpp there as well. When compiling, it threw the same error (with the updated path structure):
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
The source code is still the same my original post (and obviously so is my version).
The file structure now looks like this:
C:\Dev-Cpp\ <contains the dev c++ installation>
C:\dev\projects\ <contains project1>
-IsmAvatar (I am the original poster, just forgot to sign my name)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That log doesn't look like a rebuild all - there is no sign in your log of the clearing out operation - in fact, it looks identical to your previous log post.
Here is an example of something I just did following your general path...
Compiler: Default compiler
Building Makefile: "C:\mycstuff\Makefile.win"
Executing make clean
rm -f main.o Project1.exe
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-09
I am sorry that did not work - it did look identical to a problem I had seen and others have reported. Sorry to have put you to such trouble. I must admit to being at a loss - to the point I can only make a few 'due diligence' suggestions:
1) What anti-virus tool are you using? Have you tried disabling it temporarily?
2) Have you run a disk error scan.
3) Have you tried a reinstallation?
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) For all intensive purposes, I use none. I have a number of powerful tools quite capable of detecting malware and the likes when run, but no program specific to antivirus. I do not like those programs running in the background for reasons not unlike this. The one I will say is closest to a virus-scanner is TuneUp Utilities 2006, and it asks me before interfering with anything.
2) I don't believe so, no. How would I do that? The name does not sound familiar.
3) This is the reinstallation, as stated in the original post, I had tried it once before and it reported the same problem, so I cleanly uninstalled it and then installed it to the default directory instead, and the problem persisted.
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I defragmented my computer to see if it would have any effect. There were a few fragmentations, and afterwards there were no fragmentations (I was surprised as well). I'm sure that's probably not the same as your Disk Error Scan, but that's the best I could come up with. The problem persists.
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
-IsmAvatar
ps, I would like to have this problem solved in the near future so that I can work on school projects. Right now I'm relying on ssh to log into my school's linux kernel, editing with vi, and compiling with cc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-11
There is nothing to stop you using the MinGW command line tools. You will need to set the path environment variable, but for the time being it may remove the need to log in to a remote system.
To running a disk error scan from the GUI: Right-click the drive in explorer, select the tools tab, and click the "Check-now" button. From the command line run:
chkdsk c:
If it comes up with errors, run it again like:
chkdsk c: /f
and reboot the machine.
I must say that you have a rather cavalier attitude to computer security. Using a computer connected to the Internet without an anti-virus tool is like swimming in effluent with an open wound - you are going to get infected! Worse still (for us), your machine can be co-opted by malicious code for use in spamming, virus propogation, and co-ordinated DoS attacks for example. Some would say that you owe it therefore to others therefore to protect your machine.
I can recommend Grisoft's AVG Free - it's free, light weight, does not constantly nag and prompt, and is supplied daily with updates for free. When doing a full scan, you do see a drop in performance as it thrashes your disk, but if necessary you can pause the operation while you get some work done. My laptop came with the Panda Platinum, it was a real pain in the but, and I removed it in disgust. I now use the following free tools:
AVG Free
Microsoft Windows Defender
SpyBot S&D
XP's built in Firewall
A hardware firewall in my ADSL router.
If you don't have a hardware firewall, you may prefer to use ZoneAlarm's free version instead of XP's own tool. Microsoft Windows Defender has a useful "Software Explorer" tool that can analyse all background and start-up programs that run on your system - giving information on location and author as well as giving a threat analysis. SpyBot will remove tracking cookies that Defender ignores (because they are a privacy rather than a security issue). Spybot only scanns when you run it, wheras Defender is automatic.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran the GUI first via My Computer, R-click on C:, Properties, tools, checkdisk. GUI returned nill results.
cmd chkdsk c: returned:
File verification completed
Deleting index entry USPA1493[3].xml in index $I30 of file 4328.
Deleting index entry USPA14~3.xml in index $I30 of file 4328.
Index verification completed
Errors found.
I then rebooted to re-scan in /F mode chkdsk c: /F
chkdsk in reboot mode ran fine, and when it finished (although I obviously couldn't catch it all, it booted up too quickly) I caught that it said that it had made corrections to the filesystem.
I then opened up my dev project and tried to compile to find the exact same Complile Log error as before.
As for my protection, my apologies for not being specific. I already use Spybot, AdAware, HijackThis, StartupMonitor, MoveOnBoot (for deleting stuff that won't let me delete by hand), SpywareBlaster, CWShredder, PrcView, KillBox, and SmitfraudFix (these last 4 are for when I actually do get a virus/malware, it tends to be this virus that only really good programmers get, and you need these 4 tools to remove it), and paid versions of XoftSpy, Ewido, and TuneUp Utilities 2006 (which is a very powerful program). I always get the latest Windows Updates, and have a legal copy of Windows (heaven forbid). I keep the firewall disabled because it interferes with my internet games.
I will gladly look into your recommended Grisoft AVG Free, though.
I appreciate your help thusfar, and I hope we can resolve this issue. If it helps any, I do use a large number of other programming languages, including Pascal (using the Dev interface, installed to C:\Pascal, as well as the Lazarus interface for when I need a GUI), Java, Python, AutoIt, and GameMaker (just to name a few).
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I to had this problem, after I moved the project to it's own folder (seperate)the problem cleared up and my source files would compile into the project -- strange!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I already posted the log after moving the project a few days ago. If you want me to move the project again and re-post the compile log, just say so. Otherwise, here is the compile log that it reports now (which I'm pretty sure is the same compile log reported the last couple of times):
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
It's funny (yet somewhat irrelevant) because I have a remote Linux server which I am using to compile my C code while I try and get Dev working, and I just discovered the server doesn't have Make installed on it, and here I am having trouble with dev's Make. I'm talking that one over with my administrator, so let it not concern you other than for amusement purposes.
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-16
>> I already posted the log after moving the project a few days ago.
You are right, sorry I mis-read the path "C:\dev\projects\Makefile.win"
We may be flogging a dead horse here but, copy the command line : g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" from teh compile log, and paste it into a command line console with the current-working-directory set to: C:\dev\projects\
Also does main.cpp actually exist in C:\dev\projects\ ?
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well that's interesting. I accidentally opened up main.cpp (which does exist in C:\dev\projects\main.cpp) instead of Project1.dev, and it compiled and ran fine.
So I closed that out, opened up the dev project, and compiled (same error). I then copied the g++ command and all the parameters (it spanned two lines, and ended with 3 spaces which I omitted) and then right clicked on cmd and pasted it and pressed enter. Output (surprisingly):
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
I think we may be on to something here. It seems like g++ isn't told where to find main.cpp, so it's looking locally (and through the path variable), and not finding it. Would you like me to show you Makefile.win? It's 31 lines long.
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-17
Only executables and DLLs are searched for via teh PATH environment variable.
Have you tried deleting simply creating a new project from scratch?
It may indeed help to post the makefile and.or the .dev file.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I deleted C:\dev (that was the folder containing the project). I then opened up Dev-C++, Started a new Console Project, and when it asked me to save it I created a folder C:\dp and place Project1.dev inside it. I then clicked the compile button and saved C:\dp\main.cpp, and the same error showed up as usual.
I use a number of other programming languages as well, such as Pascal (did I mention that already?), using the FPC compiler, which also has Make installed, so on a hunch, here's my path variable(s):
System variables, Path:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Java\jdk1.5.0_05\bin;C:\Program Files\GTK2\bin;C:\Dev-Cpp\bin
User variables, PATH:
C:\FPC\bin\i386-Win32;C:\Program Files\SSH
On this hunch, I searched through all those locations for make and g++ using the dir <location> | find "name" method. Make showed up in FPC\bin and Dev-Cpp\bin, and g++ only showed up in Dev-Cpp\bin. I removed FPC and SSH from the User PATH variable, and then tried to run it again, but it still has the same error.
-IsmAvatar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-20
>> "using the dir <location> | find "name" method."
You like to do things the hard way! Windows Explorere has a search tool built in. I'd search the entire drive if I were you, just to be sure. Did you close and re-open Dev-C++ after setting the path?
The presence of 'foriegn' make utilities (or even non-MinGW builds of make) can cause problems. I'd search for all occurances regardless of the PATH variable, and temporarily rename them - just to be sure!
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that turned up another make in lazarus (an IDE for Pascal), so I renamed all the makes I found to mak_e. Of course, changes to the path variable and these renames were performed with no other programs running (not even Dev). g++ did not turn up anywhere except in the dev-cpp folder. At any rate, I then tried Dev-C++ again just to find the same error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Versions
Dev CPP 4.9.9.2 (beta) on Windows XP Home Edition SP2
2) Code
I just created a new Console project, which defaulted to this code, which throws the error.
include <cstdlib>
include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}
3) Compile Log
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\Project1\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Projects\Project1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
4) Some background information
This is a fresh, clean install. The one before it had the same problem, but I had installed it to C:\cpp, so I decided to try the default path instead, after making sure to cleanly uninstall that version (ran C:\cpp\uninstall.exe), deleting the cpp folder, and then deleting the two hidden devcpp files and the devcpp folder in the local settings folder. Rebooted, redownloaded installer, installed to default directory. Problem persists.
This is a strange error because main.cpp is right where it says it isn't, I'm looking at it with my own two eyes.
Also, if it serves any interest, I did add C:\Dev-Cpp\bin to the path environmental variable, and typing "g++" in a command prompt results in "g++: no input files" as is expected.
Seeing as I already have Eclipse for Java and am familiar with it, I think the CDT plug-in sounds the most appealing. Thank you very much.
There is an apparent bug in Dev-C++ that causes this to occur when projects are kept in a subfolder of teh Dev-C++ installation folder. Weird but true! I thought everyone else just had bad set-ups until t happend to me one day when I was just too lazy to navigate to a new folder!
Simply place your project in c:\dev\projects for example. It is not really good practice in any case to 'pollute' the program installation with user files (IMO). It may make make upgrades, uninstalls, and reinstallations problematic.
Hope it works for you. It seems ot have solved the same problem for others, and myself.
Clifford
Sorry, but that didn't solve the problem.
I deleted C:\Dev-Cpp\Projects (just the Projects folder) and created C:\dev and C:\dev\projects. I then re-opened Dev-C++ and started a new Project and saved it in the newly createc C:\dev\projects folder, and likewise saved main.cpp there as well. When compiling, it threw the same error (with the updated path structure):
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make...
make.exe -f "C:\dev\projects\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
The source code is still the same my original post (and obviously so is my version).
The file structure now looks like this:
C:\Dev-Cpp\ <contains the dev c++ installation>
C:\dev\projects\ <contains project1>
-IsmAvatar (I am the original poster, just forgot to sign my name)
Could you do a rebuild all please. I don't expect this to fix anything, but your log might show me something.
Wayne
Seems to be the same error:
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make...
make.exe -f "C:\dev\projects\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
-IsmAvatar
That log doesn't look like a rebuild all - there is no sign in your log of the clearing out operation - in fact, it looks identical to your previous log post.
Here is an example of something I just did following your general path...
Compiler: Default compiler
Building Makefile: "C:\mycstuff\Makefile.win"
Executing make clean
rm -f main.o Project1.exe
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe main.o -o "Project1.exe" -L"C:/Dev-Cpp/lib"
Execution terminated
Compilation successful
Oh, I must have used Ctrl+C instead of right click. My apologies.
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make clean
rm -f main.o Project1.exe
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
-IsmAvatar
I am sorry that did not work - it did look identical to a problem I had seen and others have reported. Sorry to have put you to such trouble. I must admit to being at a loss - to the point I can only make a few 'due diligence' suggestions:
1) What anti-virus tool are you using? Have you tried disabling it temporarily?
2) Have you run a disk error scan.
3) Have you tried a reinstallation?
Clifford
1) For all intensive purposes, I use none. I have a number of powerful tools quite capable of detecting malware and the likes when run, but no program specific to antivirus. I do not like those programs running in the background for reasons not unlike this. The one I will say is closest to a virus-scanner is TuneUp Utilities 2006, and it asks me before interfering with anything.
2) I don't believe so, no. How would I do that? The name does not sound familiar.
3) This is the reinstallation, as stated in the original post, I had tried it once before and it reported the same problem, so I cleanly uninstalled it and then installed it to the default directory instead, and the problem persisted.
-IsmAvatar
This problem is still not solved.
I defragmented my computer to see if it would have any effect. There were a few fragmentations, and afterwards there were no fragmentations (I was surprised as well). I'm sure that's probably not the same as your Disk Error Scan, but that's the best I could come up with. The problem persists.
Compile log:
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make...
make.exe -f "C:\dev\projects\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
Rebuild Compile log:
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make clean
rm -f main.o Project1.exe
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
-IsmAvatar
ps, I would like to have this problem solved in the near future so that I can work on school projects. Right now I'm relying on ssh to log into my school's linux kernel, editing with vi, and compiling with cc.
There is nothing to stop you using the MinGW command line tools. You will need to set the path environment variable, but for the time being it may remove the need to log in to a remote system.
To running a disk error scan from the GUI: Right-click the drive in explorer, select the tools tab, and click the "Check-now" button. From the command line run:
chkdsk c:
If it comes up with errors, run it again like:
chkdsk c: /f
and reboot the machine.
I must say that you have a rather cavalier attitude to computer security. Using a computer connected to the Internet without an anti-virus tool is like swimming in effluent with an open wound - you are going to get infected! Worse still (for us), your machine can be co-opted by malicious code for use in spamming, virus propogation, and co-ordinated DoS attacks for example. Some would say that you owe it therefore to others therefore to protect your machine.
I can recommend Grisoft's AVG Free - it's free, light weight, does not constantly nag and prompt, and is supplied daily with updates for free. When doing a full scan, you do see a drop in performance as it thrashes your disk, but if necessary you can pause the operation while you get some work done. My laptop came with the Panda Platinum, it was a real pain in the but, and I removed it in disgust. I now use the following free tools:
AVG Free
Microsoft Windows Defender
SpyBot S&D
XP's built in Firewall
A hardware firewall in my ADSL router.
If you don't have a hardware firewall, you may prefer to use ZoneAlarm's free version instead of XP's own tool. Microsoft Windows Defender has a useful "Software Explorer" tool that can analyse all background and start-up programs that run on your system - giving information on location and author as well as giving a threat analysis. SpyBot will remove tracking cookies that Defender ignores (because they are a privacy rather than a security issue). Spybot only scanns when you run it, wheras Defender is automatic.
Clifford
I ran the GUI first via My Computer, R-click on C:, Properties, tools, checkdisk. GUI returned nill results.
cmd chkdsk c: returned:
File verification completed
Deleting index entry USPA1493[3].xml in index $I30 of file 4328.
Deleting index entry USPA14~3.xml in index $I30 of file 4328.
Index verification completed
Errors found.
I then rebooted to re-scan in /F mode chkdsk c: /F
chkdsk in reboot mode ran fine, and when it finished (although I obviously couldn't catch it all, it booted up too quickly) I caught that it said that it had made corrections to the filesystem.
I then opened up my dev project and tried to compile to find the exact same Complile Log error as before.
As for my protection, my apologies for not being specific. I already use Spybot, AdAware, HijackThis, StartupMonitor, MoveOnBoot (for deleting stuff that won't let me delete by hand), SpywareBlaster, CWShredder, PrcView, KillBox, and SmitfraudFix (these last 4 are for when I actually do get a virus/malware, it tends to be this virus that only really good programmers get, and you need these 4 tools to remove it), and paid versions of XoftSpy, Ewido, and TuneUp Utilities 2006 (which is a very powerful program). I always get the latest Windows Updates, and have a legal copy of Windows (heaven forbid). I keep the firewall disabled because it interferes with my internet games.
I will gladly look into your recommended Grisoft AVG Free, though.
I appreciate your help thusfar, and I hope we can resolve this issue. If it helps any, I do use a large number of other programming languages, including Pascal (using the Dev interface, installed to C:\Pascal, as well as the Lazarus interface for when I need a GUI), Java, Python, AutoIt, and GameMaker (just to name a few).
-IsmAvatar
I to had this problem, after I moved the project to it's own folder (seperate)the problem cleared up and my source files would compile into the project -- strange!
That's what Slocombe said, so I moved the project to a separate folder and the problem persisted.
It may be useful for you to re-post the compile log now you have moved the project.
Clifford
I already posted the log after moving the project a few days ago. If you want me to move the project again and re-post the compile log, just say so. Otherwise, here is the compile log that it reports now (which I'm pretty sure is the same compile log reported the last couple of times):
Compiler: Default compiler
Building Makefile: "C:\dev\projects\Makefile.win"
Executing make...
make.exe -f "C:\dev\projects\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
It's funny (yet somewhat irrelevant) because I have a remote Linux server which I am using to compile my C code while I try and get Dev working, and I just discovered the server doesn't have Make installed on it, and here I am having trouble with dev's Make. I'm talking that one over with my administrator, so let it not concern you other than for amusement purposes.
-IsmAvatar
>> I already posted the log after moving the project a few days ago.
You are right, sorry I mis-read the path "C:\dev\projects\Makefile.win"
We may be flogging a dead horse here but, copy the command line : g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" from teh compile log, and paste it into a command line console with the current-working-directory set to: C:\dev\projects\
Also does main.cpp actually exist in C:\dev\projects\ ?
Clifford
Well that's interesting. I accidentally opened up main.cpp (which does exist in C:\dev\projects\main.cpp) instead of Project1.dev, and it compiled and ran fine.
So I closed that out, opened up the dev project, and compiled (same error). I then copied the g++ command and all the parameters (it spanned two lines, and ended with 3 spaces which I omitted) and then right clicked on cmd and pasted it and pressed enter. Output (surprisingly):
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>cd C:\dev\projects
C:\dev\projects>del main.exe
C:\dev\projects>g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
C:\dev\projects>dir /w
<Various directory information>
[.] [..] main.cpp main.o Makefile.win
Project1.dev
<Various other directory information>
C:\dev\projects>exit
I think we may be on to something here. It seems like g++ isn't told where to find main.cpp, so it's looking locally (and through the path variable), and not finding it. Would you like me to show you Makefile.win? It's 31 lines long.
-IsmAvatar
Only executables and DLLs are searched for via teh PATH environment variable.
Have you tried deleting simply creating a new project from scratch?
It may indeed help to post the makefile and.or the .dev file.
Clifford
I deleted C:\dev (that was the folder containing the project). I then opened up Dev-C++, Started a new Console Project, and when it asked me to save it I created a folder C:\dp and place Project1.dev inside it. I then clicked the compile button and saved C:\dp\main.cpp, and the same error showed up as usual.
Table of Contents:
> Compile Log
> Makefile.win
> Project1.dev
> main.cpp
----------Compile Log----------
Compiler: Default compiler
Building Makefile: "C:\dp\Makefile.win"
Finding dependencies for file: C:\dp\main.cpp
Executing make...
make.exe -f "C:\dp\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
g++.exe: main.cpp: No such file or directory
g++.exe: no input files
make.exe: *** [main.o] Error 1
Execution terminated
----------Makefile.win----------
Project: Project1
Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib"
INCS = -I"C:/Dev-Cpp/include"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
BIN = Project1.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before Project1.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Project1.exe" $(LIBS)
main.o: main.cpp C:/Dev-Cpp/include/c++/3.4.2/cstdlib C:/Dev-Cpp/include/c++/3.4.2/iostream
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
----------Project1.dev----------
[Project]
FileName=Project1.dev
Name=Project1
UnitCount=1
Type=1
Ver=1
ObjFiles=
Includes=
Libs=
PrivateResource=
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=
IsCpp=1
Icon=
ExeOutput=
ObjectOutput=
OverrideOutput=0
OverrideOutputName=
HostApplication=
Folders=
CommandLine=
UseCustomMakefile=0
CustomMakefile=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=
[Unit1]
FileName=main.cpp
CompileCpp=1
Folder=
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
AutoIncBuildNr=0
----------main.cpp----------
include <cstdlib>
include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}
----------End----------
-IsmAvatar
I use a number of other programming languages as well, such as Pascal (did I mention that already?), using the FPC compiler, which also has Make installed, so on a hunch, here's my path variable(s):
System variables, Path:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Java\jdk1.5.0_05\bin;C:\Program Files\GTK2\bin;C:\Dev-Cpp\bin
User variables, PATH:
C:\FPC\bin\i386-Win32;C:\Program Files\SSH
On this hunch, I searched through all those locations for make and g++ using the dir <location> | find "name" method. Make showed up in FPC\bin and Dev-Cpp\bin, and g++ only showed up in Dev-Cpp\bin. I removed FPC and SSH from the User PATH variable, and then tried to run it again, but it still has the same error.
-IsmAvatar
>> "using the dir <location> | find "name" method."
You like to do things the hard way! Windows Explorere has a search tool built in. I'd search the entire drive if I were you, just to be sure. Did you close and re-open Dev-C++ after setting the path?
The presence of 'foriegn' make utilities (or even non-MinGW builds of make) can cause problems. I'd search for all occurances regardless of the PATH variable, and temporarily rename them - just to be sure!
Clifford
that turned up another make in lazarus (an IDE for Pascal), so I renamed all the makes I found to mak_e. Of course, changes to the path variable and these renames were performed with no other programs running (not even Dev). g++ did not turn up anywhere except in the dev-cpp folder. At any rate, I then tried Dev-C++ again just to find the same error.
Oh my God!