问题
I am just working on my bachelor thesis... It is a VST plugin (DLL library), which have dependency on libfftw3-3.dll (FFT library). When testing on my Laptop (64bit Win7 ultimate), i found a problem... I cant import this VST to any of Music Studios...
As on my PC, i have copied VST plugin dll and libfftw3-3.dll in the VstPlugins directory, but when i try to import this VST, system tells me that libfftw3-3.dll cannot be found.
This is not COM object, so i cant register it using regsvr32...
Can you please help me, what i am doing wrong? And how i can get this to work?
回答1:
A VST is a COM component. It is loaded by the client program , the underlying call is CoCreateInstance(). The problem here is that Windows will only look in the directories that are relevant to the client program for the DLL you use. You surely didn't copy the DLL into the directory of the EXE, nor should you.
This is a generic problem with COM, solving it cleanly isn't easy. The Windows side-by-side cache is a solution but you'll graduate before you get that sorted out. You can punt the problem by modifying the system PATH environment variable. Or the desperate move, copying the DLL to c:\windows\system32 (syswow64 on the 64-bit version of Windows). Just to get you graduated, mind you.
If you still have trouble then you might have additional dependencies you don't know about. The CRT dll is a typical one, you'll get that when you compile your code with /MD in effect. You can chase those dependencies down with SysInternals' ProcMon utility, you'll see the client program searching for the DLL. Or DependencyWalker in Profile mode (F9).
来源:https://stackoverflow.com/questions/10183510/dll-library-not-found