Theres quite a bit of code, so I don't know if posting it will help or just make the page full of useless info, so I'll just state the problem and info.
I declare a std::map called KeyMap, and a pointer to a class called Proc_Button, and receive multiple definition errors.
Which is usually easy enough to fix. However, I have commented out every definition for those variables, and the problem persists. Commenting out the declaration, definitions, and uses of those variables allow me to compile with no problem. On top of there being no definitions involved in the 'multiple definition' error, GCC's error log points me to headers and source files where those particular variables aren't used or mentioned, even in commented out code. One line even brings me to stl_tree.h
I have tried commenting the relevant lines out, I have created a fresh Code::Blocks project, changed the name and location of where those variables are declared, and spent about 20 minutes or so Googling around for a solution, so I'm completely stumped and have no idea how to fix this rather annoying problem.
Both KeyMap and Proc_Button are in a namespace
Any new, similar declarations get the same problems
KeyMap was working, it just stopped upon the latest attempts to compile.
Proc_Button is declared just like a variable with a similar use called Proc_Input which is working fine
IDE is Code::Blocks 10.5
Compiler is MingW's GNU GCC Compiler
If the variables aren't even declared anywhere, then any attempts to use them should result in a compile error before you even get to the linker.
I suspect what you may be facing is a modification date issue; some object file isn't being recompiled when it should be. Creating a new project *should* have bypassed that, but I guess it's possible that's still the problem. Do a make clean, or a rebuild all.
It compiles fine when it's not declared. The problem arises with a declaration. I've been using rebuild all the entire time I spent on this, so that hasn't helped. I just tried cleaning the project and the errors are still popping up when I rebuild.