I have a C++ application on Windows, compiled with MSVC, that is linking to a number of dlls at runtime. The application has an Excel front end: an .xll file that the user can load into excel. The user should be able to load the xll from whichever location.
All the dlls are located on a shared drive and none of the users has this location added to his/her windows path variable (I wouldn’t want that, since these dlls could clash with other programs). I’ve made the application such that, when the application is launched, the Windows path variable is changed locally (only in the session in which the application is running) to include the path to these dlls.
This only works because, in my Visual Studio solution, I’m able to specify that these dlls should be delay loaded (run-time dynamic loading).
Here comes my problem: I want to use boost-python for a python front end. Boost python forces my application to load python27.dll when the application is started (load-time linking), i.e. without delay.
I actually tried linking with delay, and got the following error: 1>LINK : fatal error LNK1194: cannot delay-load 'python27.dll' due to import of data symbol '__imp___Py_NoneStruct'; link without /DELAYLOAD:python27.dll
My question is whether I can somehow modify the load-time search path, from within my application?
Note that all those users that use the Excel front-end, don't intend to use the python front end (which is meant for another group of users), so I cannot be sure that those Excel users have python installed, especially not version 2.7.
Many thanks in advance, Nele