Incomplete Type In Named In Nested Name Specifier


#1

Hi all. I’m having a problem with circular dependencies when trying to manage my windows with a ‘WindowList’ class. When I want to close a window with closeButtonPressed code below, I need to remove the object from the windowList file, however I am including WindowSetter in the WindowList file. Previous errors like this have been solvable through a forward declaration, however I am not sure how to solve this one. Anny suggestions?
(code can be viewed here: https://gist.github.com/anonymous/7d43c6d5b2cf1fef618be9f75077ad0c)

void closeButtonPressed() override
{
    MyoMapperApplication::getWindowList().remove (/*Pointer To This Window*/);
    owner = nullptr;
}

#2

You need to split the implementation and declaration of your WindowSetter class. Put only the class/method declarations in your WindowSetter.h and put the actual method implementations in a separate file WindowSetter.cpp.


#3

Of course, how did I miss that! Thanks Fabian