On Monday 15 November, Geoffrey Furnish wrote: [...]
2) No global objects as we are linking against a C compiled Python.
There is a patch posted on the C++ SIG website, which modifies the configure script for Python to allow you to get your main linked with C++, which ensoures that global ctors get run correctly. If you use that, you don't need rule 2) above.
I'm intrigued by the assertion that you can't use global objects when the Python executable is compiled with C. For which platforms is it true? I've successfully used global C++ objects with constructors on Linux, Solaris and Windows NT, without compiling Python itself with C++. I've done this while providing Python bindings for omniORB. My Python extension module does not have any global objects itself, but it is (dynamically) linked with the main omniORB library which does. Maybe that's why it works? Cheers, Duncan. -- -- Duncan Grisby \ Research Engineer -- -- AT&T Laboratories Cambridge -- -- http://www.uk.research.att.com/~dpg1 --