Help - Search - Members - Calendar
Full Version: Creating a plug-in that links to another DLL via import library
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
psasidisrcum
Hi all,

I'm trying to create a simple DSP plug-in for foobar, that links to another DLL. I'm linking to it using an import library (.lib file). When build my plug-in, place it in the components directory and run foobar, it gives me this message:

"Failed to load DLL: foo_dsp_sandbox.dll. Reason: This component is missing a required dependency, or was made for different version of foobar2000."

I've tried placing the other DLL in the foobar2000 directory, the components directory, and in windows\system32 directory, but hit the same error.

The other DLL and its .lib file are fine; I've linked to it successfully in a stand-alone Win32 console app. Also, foo_dsp_sandbox.dll works fine if I remove all references to the other DLL and don't link to it.

Does this mean that I need to link to the other DLL without the .lib file? I'd like to avoid it, if at all. If this is indeed the case, could you explain why it is so?

Thanks!
lvqcl
foo_input_tak.dll is linked against tak_deco_lib.dll; foo_dsp_fsurround.dll is linked against libfftw3f-3.dll.

So it is possible to make what you want. You should place another dll in foobar2000 folder, not in components folder.

I don't know what's wrong with your component - it should work.
Yirkha
DLL search order.
psasidisrcum
Yes, it does turn out that this is possible. Thanks for your input on this.

It turns out that my other DLL was being compiled with /MD, which caused it to look for msvcr90.dll, which it couldn't find, for whatever reason. Re-compiling with /MT solved it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.