September 29th, 2010, 02:40 PM
[RESOLVED] Crazy Multiple Definition Problem
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
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!