My VS2012 Solution contains several VC++ projects. I also have many common files that need to be shared. It's easy to share enum's and structures. I just "include" corresponding header file and that's it. I even don't need to compile my "commons" project!
But what if I need to share more complex classes that contain both .h and .cpp files, and so need to be compiled?
And the most complicated question - can I share thread-safe singleton? I want to access it from different projects from different threads (but from one process).
I guess I should use something like static or dynamic linking, but i'm not sure. Probably someone can link step-by-step tutorial to solve such problem?
I would prefer something portable as I will move entire solution to Linux later.