Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th April 2011, 20:20 | #1 | Link |
Registered User
Join Date: Mar 2011
Posts: 3
|
LoadPlugin: unable to load
I am getting this error message when trying to open my plugin DLL:
--------------------------- VirtualDub Error --------------------------- Avisynth open failure: LoadPlugin: unable to load "C:\Program Files (x86)\AviSynth 2.5\plugins\PerfPlugins.dll" (C:\Users\madeeds\Documents\Video Performance\AviSynth\Convolution.avs, line 14) --------------------------- OK --------------------------- It was working fine until I tried to link in the 32-bit FFTW library (libfftw3-3.lib). I am using Visual Studio 2010 and have the target set to Win32 Debug. As you can see from the path above, AviSynth is also 32 bit. Any tips on what's going wrong or how to debug it? I tried to debug, with VS, but as you might expect, the failure is happening before the DLL is loaded. |
19th April 2011, 00:15 | #2 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
You probably have a library dependency issue. Run dumpbin /imports to see what runtime .dll's are needed. Then install the required runtime libraries.
Hint: you probably don't have the runtimes that libfftw3-3.lib was compiled against. |
19th April 2011, 16:32 | #3 | Link |
Registered User
Join Date: Mar 2011
Posts: 3
|
Thanks, Ian.
I've put the version of the DLL that I generated the .lib file from into the same directory as my DLL. Do I need to load that DLL from my DLL, or does the runtime take care of that for me? dumpbin /import lists "libfftw3-3.dll" and the functions that I use in that library. I tried calling LoadLibrary from DllMain, and that gives me a result of zero - failure. I also tried without this. AvisynthPluginInit2 is being called from my DLL (I can stop it here in the debugger), but the "Create" method that I've defined for my function is not. When you say "install the required runtime libraries" is there something I need to do to register them with the OS like in the GAC? |
19th April 2011, 20:24 | #5 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
That's because during script loading, the current directory is set to the script directory. An alternative is to put it in a folder (directory) that is on your PATH environment variable, then it is available independently of your script location. Normally one would put it in C:\Windows\System32.
|
Tags |
debugging, error, plugin, vs2010 |
|
|