So... could we please move the (now proven to not be a fix) #pragma once discussion to another thread please? Thank you.
@DoctorJ
For the sake of testing, can you move or copy that "enum MakeEvent ..." into EventManager.h and confirm that everything would work if it could find it? Perhaps add a fake enum into GQE_Types.h and see if it that can be referenced somewhere else within EventManager.h?
Yes, I just did and it compiles completely fine if the enum statement is placed in EventManager.h inside the namespace GQE brackets. This follows the original pattern - the compiler recognizes the included headers, but not the forward declarations. However, if the forward declarations are made in the files they are used in, they work just fine. Other header files that originally came with the source code can use declarations in the GQE/GQE_Types.h perfectly fine - it's just a few headers that I have added that can't find anything there.
Oh wow... just did more testing and the plot thickens. There is another enum in the GQE_Types file that has been there since I got the original source code called StatusType. When I replace "MakeEvent" with "StatusType" in EventManager.h, the program compiles normally. However, when I use MakeEvent, the program will only compile if my new enum (MakeEvent) is declared in the EventManager.h header.
Summery: the enums and class declarations that came with GQE_Types are completely usable in all header files that GQE_Types is included in. All of the class declarations and enums that I have added to the header will only work if I make the declaration in the header that I use them in (However, if I include EventManager.h in EventManager.cpp, then the .cpp file will use MakeEvent just fine - it just doesn't like my enums/forward declarations added to GQE_Types.h)
@devlin:
Did you intend to make it a const reference? (and thus forgot the &)
Also, namespaces shouldn't have a semicolon ';' after them. Usually this isn't much of an issue as it would be stripped out by the compiler as a noop - but I'm not sure how well C::B functions.
No, just meant to pass the MakeEvent to the function. Thanks for the namespace tip. I stripped out a few semi-colons from the namespace brackets and it didn't do anything good or bad. I'm too lazy to go through and take them out, so they'll probably stay for a bit