Quote Originally Posted by CornedBee View Post
There's no guaranteed order of initialization between globals of different modules.
So, presumably the two global objects could be put in a "globals.cpp" or "main.cpp" and the order of the objects themselves would define the order of initialization.

This is of course not a very natural way to solve the problem, but it IS a possibility - the biggest problem comes when you have hundreds of different modules with various global objects, in which case wrapping the object into something that can perform it's initialization as needed is the right solution, such as the singleton pattern. [There are other solutions that do similar things, but they all rely on "if this is not set, create an object, else return the existing object"].

--
Mats