How do I make main a friend of my class from within a library?
问题 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 whole story is that this is a library the contains a class in one file and the main in another file, all linked into my library. The library is providing the basis for a Process Framework, which is why the main is in the library and not the process. Below is a stripped down version of what I have. pf.hpp using namespace std;