I create a project and a source file for the project. Then when I try to compile the source file I get an error message popping up stating: 'Could not create Makefile: "C:\Dev-Cpp\Makefile.win" I/O error 32'.
Here is the compile log:
Line File Message
C:\Dev-Cpp\Makefile.win [Build Error] No rule to make target `all'. Stop.
Now... When I close the project (after having saved it of course), exit Dev-C++, start up Dev-C++ again, reopen the project and try to compile it again there is no problem, it compiles normally. It does this whenever I try to compile a project that I created in the same session of having Dev-C++ running. I am a bit of a novice when it comes to Dev-C++ so can anyone offer any suggestions of what is going wrong and/or what I might be doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sigh That is not the complete and unedited "Compile Log".
I have no idea whether this is your only problem, but you should not create projects in the Dev-Cpp installation folder. Apart from the fact that it is just a really bad idea, there is an apparent bug in Dev-C++ that can cause projects in the installation folder or sub-folders thereof to fail to build.
When you build a C/C++ program, a number of intermediate files are created, so building in another program's folder is a really bad idea.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++ Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++ Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
Acting on the advice about creating projects in the Dev-Cpp installation folder not being a good idea I changed the folder in which I create projects. However I still get the same error message as before.
Charles
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note you went from one bad thing to another. It is a very bad idea to store projects in a directory
with spaces in its name, this is mentioned a couple of times in the "Please Read" thread.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Dev-C++ 4.9.9.2 on Windows Xp Professional SP2.
Here is the code in question:
include <cstdlib>
include <iostream>
using namespace std;
void show_binary(unsigned int);
int main(int argc, char *argv[])
{
show_binary(5);
system("PAUSE");
return EXIT_SUCCESS;
}
// Display the bits within a byte.
void show_binary(unsigned int u)
{
int t;
for(t=128; t > 0; t = t/2)
if(u & t) cout << "1 ";
else cout << "0 ";
cout << "\n";
}
The code is not my own but taken from 'C++: A Beginner's Guide' by Herbert Schildt 2nd Edition, Chapter 7. I have just added a few lines necessary to see the program output in a console window. I changed the folder in which I create projects again so the folder name has no spaces.
Here is the compiler output:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++_Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++_Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Delete the file C:\Dev_C++_Projects\Makefile.win and from the Execute menu, select Rebuild All. That solution worked here: http://sourceforge.net/forum/message.php?msg_id=4052525, and he similarly started with a path with spaces. It seems that once the generated makefile is screwed up, it stays that way unless you force it to regenerate.
If it still does not build, post the log, the content of the newly generated makefile.win file, and the project's .dev file.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I couldn't get the content of the newly generated makefile
I wonder why not? The reason is likely to be related to your problem. There should be a makefile.win, otherwise there is nothing to build!
Also I wonder why your source file is located in C:\Dev-Cpp\Templates\Listing_3.cpp? Why would you place your source code in the IDE's templates folder!? I am not sure why that should be a problem, but given Dev-C++'s sensitivity to builds involving its own folder it cannot be a good idea. When I suggested moving the project, that meant the entire project - source and all, and putting your source there seems somewhat random.
Now you mentioned that when you first open the session it builds OK, I really should have asked you to post that log too. It probably would have saved us a lot of time as it would have been obvious that your source was in an unusual location, and that you had not moved it with the project.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It still doesn't build, well not when I create it and attempt to compile it in the same session of running Dev-C++ anyway.
Here is the compile log:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++_Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++_Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
I couldn't get the content of the newly generated makefile.
I create a project and a source file for the project. Then when I try to compile the source file I get an error message popping up stating: 'Could not create Makefile: "C:\Dev-Cpp\Makefile.win" I/O error 32'.
Here is the compile log:
Line File Message
C:\Dev-Cpp\Makefile.win [Build Error] No rule to make target `all'. Stop.
Now... When I close the project (after having saved it of course), exit Dev-C++, start up Dev-C++ again, reopen the project and try to compile it again there is no problem, it compiles normally. It does this whenever I try to compile a project that I created in the same session of having Dev-C++ running. I am a bit of a novice when it comes to Dev-C++ so can anyone offer any suggestions of what is going wrong and/or what I might be doing wrong?
sigh That is not the complete and unedited "Compile Log".
I have no idea whether this is your only problem, but you should not create projects in the Dev-Cpp installation folder. Apart from the fact that it is just a really bad idea, there is an apparent bug in Dev-C++ that can cause projects in the installation folder or sub-folders thereof to fail to build.
When you build a C/C++ program, a number of intermediate files are created, so building in another program's folder is a really bad idea.
Clifford
Here is the compile log:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++ Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++ Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
Acting on the advice about creating projects in the Dev-Cpp installation folder not being a good idea I changed the folder in which I create projects. However I still get the same error message as before.
Charles
Note you went from one bad thing to another. It is a very bad idea to store projects in a directory
with spaces in its name, this is mentioned a couple of times in the "Please Read" thread.
Wayne
I am using Dev-C++ 4.9.9.2 on Windows Xp Professional SP2.
Here is the code in question:
include <cstdlib>
include <iostream>
using namespace std;
void show_binary(unsigned int);
int main(int argc, char *argv[])
{
show_binary(5);
}
// Display the bits within a byte.
void show_binary(unsigned int u)
{
int t;
for(t=128; t > 0; t = t/2)
if(u & t) cout << "1 ";
else cout << "0 ";
cout << "\n";
}
The code is not my own but taken from 'C++: A Beginner's Guide' by Herbert Schildt 2nd Edition, Chapter 7. I have just added a few lines necessary to see the program output in a console window. I changed the folder in which I create projects again so the folder name has no spaces.
Here is the compiler output:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++_Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++_Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
Delete the file C:\Dev_C++_Projects\Makefile.win and from the Execute menu, select Rebuild All. That solution worked here: http://sourceforge.net/forum/message.php?msg_id=4052525, and he similarly started with a path with spaces. It seems that once the generated makefile is screwed up, it stays that way unless you force it to regenerate.
If it still does not build, post the log, the content of the newly generated makefile.win file, and the project's .dev file.
Clifford
> I couldn't get the content of the newly generated makefile
I wonder why not? The reason is likely to be related to your problem. There should be a makefile.win, otherwise there is nothing to build!
Also I wonder why your source file is located in C:\Dev-Cpp\Templates\Listing_3.cpp? Why would you place your source code in the IDE's templates folder!? I am not sure why that should be a problem, but given Dev-C++'s sensitivity to builds involving its own folder it cannot be a good idea. When I suggested moving the project, that meant the entire project - source and all, and putting your source there seems somewhat random.
Now you mentioned that when you first open the session it builds OK, I really should have asked you to post that log too. It probably would have saved us a lot of time as it would have been obvious that your source was in an unusual location, and that you had not moved it with the project.
Clifford
It still doesn't build, well not when I create it and attempt to compile it in the same session of running Dev-C++ anyway.
Here is the compile log:
Compiler: Default compiler
Building Makefile: "C:\Dev_C++_Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev_C++_Projects\Makefile.win" all
make.exe: *** No rule to make target `all'. Stop.
Execution terminated
I couldn't get the content of the newly generated makefile.
Here is the project's .dev file:
[Project]
FileName=Module_7_Listing_3.dev
Name=Module_7_Listing_3
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=..\Dev-Cpp\Templates\Listing_3.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
Charles