It's not so early anymore, and I'm getting very frustrated due to what time it is.
Please read CAREFULLY what I am writing so I don't have to re-post this again, and again.
I first declared a class, in C++, in another header. The code is as follows:
(This is an INCOMPLETE snippet of my code)
class game{
struct color{int r,g,b,n;};
struct screen_color{color c;};
bool collision (int X, int Y, int x, int y);
int Time;
};
Then, I decided I wanted to change my class name, but I had used the class name (thus the functions including) in my main.cpp file.
I used Code::Block's "replace" tool to replace all instances of "game" in BOTH my header AND my main (I re-did this twice..).
I then tried to execute my code, but Code::Blocks returned MANY instances of this error:
Expected primary-expression before ‘.’ token
What this means - which you all know - is that it doesn't interpret the class itself which was initialized before (game.collision(...)).
Now. What I did was I changed the class name ONLY!, leaving ALL other instances of the old class name be.
The new class name is game1...
Now, it only returns ONE single error.. That is right, only ONE error... despite having many instances of undeclared class names being used.
This error is:
expected initializer before '.' token
Now, I ask you, forum, what in the HECK is wrong here? Is it me who's too tired to see the problems in my code? I can't understand why Code::Blocks works the way it does.
It should at the VERY least return multiple errors.. not just ONE.
Okay, here's some more troubling news for everyone.
You know, I said it only returns one error, right?
Check this out: when I remove "game1" from my function declaration:
bool game1::collision (int X, int Y, int x, int y)
It returns errors from OUTSIDE OF THIS FUNCTION -- which does NOT relate to the function at all.
What.. the heck is this? If you didn't get that. When I ACTUALLY make an error (Code::Blocks is reporting false errors) in the code, Code::Blocks returns NON-errors.
It returns code which is fine, as faulty...
I hope the moderators don't mind the multiple posts.
I followed the correct guide-lines, setting it to show all the build options.
Here is what it gave me:
-------------- Clean: Debug in test12 ---------------
Cleaned "test12 - Debug"
-------------- Build: Debug in test12 ---------------
mingw32-g++.exe -Wall -g -I"C:\Users\Franck\Desktop\C++ projects\C++ CodeBlocks projects\test12\" -I"C:\Users\Franck\Desktop\C++ projects\C++ CodeBlocks projects\test12\" -IC:\Users\Franck\Desktop\SDL-1.2.15\include\SDL -c "C:\Users\Franck\Desktop\C++ projects\C++ CodeBlocks projects\test12\objects.h" -o objects.h.gch
mingw32-g++.exe: projects\C++: No such file or directory
mingw32-g++.exe: CodeBlocks: No such file or directory
mingw32-g++.exe: projects\test12": No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Now, I MAY not be the brightest bulb around, but I think there's a problem here.
Why does it not recognize mingw32? I was coding perfectly fine yesterday, until around 21:00 'o clock when it started malfunctioning.
Okay, this is it. I am installing a new IDE. This is not the first time I've had these kind of problems.
I just tried switching around the type of application under the project's attributes, setting it to GUI application.
It then returned an error which it had not returned before.
I switched back to console application, and BAM--it still shows up.
undefined reference to `WinMain@16'
I can not fathom how it should be this difficult to control an IDE. I mean, the time it takes to fix these kind of issues... I've spend many days (before) and have not been able to solve any of these mysterious occurrences.
Moreover, the documentation only provides help for SOME of the issues--NOT those I have run into this far.
If anyone of you know of the problem I am experiencing - despite my lack of proper explanation - then please, let me know.
The place I work at requires that we use Code::Blocks.. for some odd reason. I have been told to finish a project within a short month or so. and with all these constant issues - I am likely to not finish it.
A last thing, how is it that the last release of Code::Blocks is from 2010 (according to the websites own data)?
With all these issues - which I am not alone to experience - you'd think we'd get a proper release.