The problem was, that boost::communicator must be called inside the main function:
boost::environment env(argc, argv);
There is a env definition which doesn't take arguments, but this didn't work in my case(don't know why).
Question
I have a class, which is a boost serialization singleton. I need to do some initialization inside the main function of the program. So I made a public function in the singleton class, which I call in the main function. Unfortunately the function somehow seems to never return, causing the remainder of the main function to not be executed... If I put a cout statement at the end of the called function, it does get printed, so nothing in the function itself is blocking.
I also found out that the singleton constructor is called before the main function is called.
I feel I'm missing something here. Can somebody shed some light on this?
Thanks
Solution
The problem was, that boost::communicator must be called inside the main function:
boost::environment env(argc, argv);
There is a env definition which doesn't take arguments, but this didn't work in my case(don't know why).