Cpp + Python: static data dynamic initialization in *nix shared lib?

Jonathan Lee jonathan.lee.975 at gmail.com
Tue Jul 13 10:41:51 EDT 2010


> Problem (C) is outside the realm of the C++ standard, since the C++ standard
> doesn't support shared libraries, and I've never actually used *nix shared
> libraries so I don't /know/...
>
> Is such dynamic initialization guaranteed?
>

Not guaranteed, though I think there's a combination of dlopen options
and gcc command line parameters that invoke this behavior. See the
second page of

   http://www.linuxjournal.com/article/3687

about auto-registration.

Personally, though, it never worked for me :/

--Jonathan



More information about the Python-list mailing list