Boost logo

Boost Users :

Subject: [Boost-users] Delay loading boost_python dll in Visual C++
From: David Aldrich (David.Aldrich_at_[hidden])
Date: 2010-07-30 04:47:26


I wish to 'delay loading' the boost_python dll in my application, built with Microsoft Visual C++ 2008, running on Windows XP. The purpose is so that I can specify at runtime the directory in which the boost_python is stored using SettDllDirectory() (I wish to store the dll in a non-standard location).

I am building in debug mode so I simply set project option Linker>Input>Delay Loaded DLLs equal to boost_python-vc90-mt-gd-1_43.dll.

When I run the code I get an exception in Microsoft file delayhlp.cpp at line 331:

return dli.pfnCur;

No boost_python API has been called until that point by my code, but the stack frame shows that boost method:

      return registry_lookup2((T(*)())0);

has been called, and resulted in the exception.

Does this simply mean that boost_python is not suited to delay loading?

(Note: it has been suggested that I use a manifest file to reference the dll, but that does not work as one cannot specify arbitrary assembly locations under Windows XP).

With best regards


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at