[C++-sig] Can boost_python dll be delay loaded?

David Aldrich David.Aldrich at EU.NEC.COM
Fri Jul 30 11:56:35 CEST 2010

Hi Niall

> I thought that the application installer registered the DLL manifests
> at their locations? It's like registering COM or .NET objects, in
> fact I think it's the same mechanism nowadays.

Well, I don't plan to use an application installer. Most of our users build and run the application from within a svn working copy.

> As for why it doesn't work when others do, I would guess it's due to
> how the BPL machinery sets itself up on process init. During static
> init the BPL library sets up all sorts of runtime information which
> is later used by BPL clients, and during all of this it is extremely
> important that everything be kept in precisely the right order.

I don't understand the intricacies of Boost's initialisation, nor do I even know when it happens. I naively thought that nothing would happen until I explicitly call a boost_python API method. Does the fact that I have included <boost/python.hpp> mean that some boost initialisation will occur before main() is reached?

> Your best bet it would seem now is to have PATH
> modified on app install, but that is a very lazy way out and is
> indeed banned in lots of corporate environments. 

Sadly, I think that is the only solution. Thanks again for your help.

Best regards


More information about the Cplusplus-sig mailing list