Please see my first attempt at answering this . I neglected to tell the whole story before in an attempt to simplify things. Turns out my example works! Sorry.
The w
A common answer might be to provide an "application" singleton class, like e.g. QApplication in Qt, an reduce your main to something like
int main (int argc, char** argv) {
YourApplication app (argc, argv);
return app.execute();
}
Then you reduce your friendness concern to class YourApplication vs your other classes, and you know how to do that.