I was just starting to learn C ++, and I found this method to display the code outputs. This worked when I first compiled Structure of programme.cpp:
#include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; }
He gave me the .exe, which I opened, ran and got the perfect "Hello World!". but when I tried to compile the second, Variables.cpp:
I did not receive .exe at all, so I could not figure out how to open it. I tried recompiling Structure of programme.cpp (after deleting all related files), but now it will no longer create .exe. The only files created are Structure of programme.o and Variables.o (in the obj \ Debug subdirectory).
The only question I could find seemed to be this , but the problem seems a bit different, and I tried to delete one of the files (so there was only one from the Program.cpp Structure or Variables.cpp in the folder), and I still had same result.
In addition, there were no compiler errors with any file, and I do not think that I changed any options in the code blocks between the structure of the working program and everything that does not work.
Thanks,
Dalkius
edit: build logs:
Compiling: Structure of a Programme.cpp Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings Compiling: Variables.cpp Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings
edit 2: Full Commandline build logs:
Build started on: 14-12-2011 at 07:57.39 Build ended on: 14-12-2011 at 08:01.03 -------------- Clean: Debug in cplusplus.com Tutorial --------------- Done. mingw32-g++.exe -Wall -g -c "D:\My Documents\0HOME\Programming\C++\Code Blocks\cplusplus.com Tutorial\Structure of a Programme.cpp" -o "obj\Debug\Structure of a Programme.o" Process terminated with status 0 (0 minutes, 1 seconds) 0 errors, 0 warnings mingw32-g++.exe -Wall -g -c "D:\My Documents\0HOME\Programming\C++\Code Blocks\cplusplus.com Tutorial\Variables.cpp" -o obj\Debug\Variables.o Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings