delay load DLL error (module not found)

0

I am working on Visual Studio 2010 Express and I have a question concerning external DLLs. I am using a DLL.

My question is: why do I get an error (0xC06D007E: Module not found) unless I put the .dll file in my project file.

To be specific, I use FFTW as an external library (a fast Fourier transform library). I followed the procedure: adding the .h file to the project; setting the proper linker properties: I have added the fftw library path to "répertoire de bibliothèques supplémentaires", in the "general" tab of the linker property tab (sorry, it’s in french!) I have added the name of the .lib file in the "Dépendances supplémentaires" field and the name of the .dll file in the "Chargement différé des DLL" field, both in the "entrée" (input) tab.

I have tried to fix things without changing the location of the dll file. I did not succeed.

Does someone have a suggestion? Thanks

In a rough translation, "répertoire de bibliothèques supplémentaires" could be "directory containing additional libraries", "Dépendances supplémentaires" ~ "other dependencies" and "Chargement différé des DLL" ~ "DLL delayed loading" (not sure of this one).

c++
visual-studio-2010
dll
asked on Stack Overflow Nov 26, 2014 by elbe • edited Nov 26, 2014 by user1032613

1 Answer

2

This is a runtime issue. All the IDE settings that you discuss relate to the compilation and linking. But your issue arises at runtime.

DLLs are loaded at runtime and the system looks for them using the Dynamic-Link Library Search Order. Clearly you need your DLL to be found by that search. The simplest, and usually the preferred, way to achieve this is to place the DLL in the same directory as the executable.

answered on Stack Overflow Nov 26, 2014 by David Heffernan

User contributions licensed under CC BY-SA 3.0