A C++ app has this exe/dll layout:
Main.exe, Framework.dll, PluginA.dll, PluginB.dll, ..., PluginN.dll
Both Main.exe and Framework.dLL provide functions to the Plugin#.dll.
The Plugins are depedent on Main.exe and Framework.dll, but not the other way around. Framework.dll depends on functions provided by Main.exe
Now, the problem is that there is a circular dependency between Main.exe and Framework.dll because Main.exe depends on 1 class in Framework.dll that it uses to manage the lifecycle of Framework.dll
So, in Main.exe, it would be something like this:
#include "Framework.hpp"
int main() {
Framework fw;
fw.Init();
while (Quit() == false) {
fw.Begin();
DoWork();
fw.End();
MoreWork();
}
fw.Shutdown();
return 0;
}
So, Main.exe depends on only 1 class from Framework.dll, but that's enough to create their circular dependency.
Is there a way to still use that one Framework class from Main.exe while still breaking
the circular dependency? Specifically, so that Main.exe doesn't require the export library Framework.lib
to build.