[C++-sig] Delayed load of pythonXX.dll

Stefan Seefeld seefeld at sympatico.ca
Thu Mar 2 15:35:43 CET 2006


G Hansford wrote:
> I'm trying to determine if it's possible to delay the loading of the Python
> DLL on Windows. I would like my application to disable scripting support
> (but still run) if Python24.dll is missing. The Delay Loaded DLLs option in
> Visual C++ 7.1 seemed like it would solve my problem, but when I added
> python24.dll, I get the following link error:
> fatal error LNK1194: cannot delay-load 'python24.dll' due to import of data
> symbol '__imp___Py_NoneStruct'

If you want to disable scripting support you probably want to delay-load
not only the python runtime, but boost.python, too. Your problem stems
from statically linking with boost.python, which depends on the python
runtime library, forcing you to provide that at program startup.

Regards,
		Stefan



More information about the Cplusplus-sig mailing list