On Sat, May 17, 2014 at 10:07 PM, Zlobin Nikita <cook60020tmp@email-addr-hidden> wrote:
> Code - includes are omited, line with main() declaration is numbered
>
> 30: int main (int argc, char ** argv)
> {
> //LADSPAPluginSearch(describePluginLibrary);
> char plugpath [] = "/usr/lib/ladspa/tap_echo.so";
> void * pvPluginHandle = dlopen(plugpath, RTLD_NOW | RTLD_LOCAL);
> if (pvPluginHandle) dlclose (pvPluginHandle);
> else printf ("dlopen failed: %s\n", plugpath);
> return 0;
> }
If you want to find out why the dlopen() call is *actually* failing,
use dlerror():
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
int
main(int argc, char **argv)
{
if (argc != 2) {
fprintf(stderr, "Usage: %s plugin-path\n", argv[0]);
exit(EXIT_FAILURE);
}
void *handle = dlopen(argv[1], RTLD_NOW | RTLD_LOCAL);
if (handle == NULL) {
fprintf(stderr, "%s: %s: %s\n", argv[0], argv[1], dlerror());
exit(EXIT_FAILURE);
}
dlclose(handle);
return EXIT_SUCCESS;
}
-- Devin Anderson surfacepatterns (at) gmail (dot) com blog - http://surfacepatterns.blogspot.com/ midisnoop - http://midisnoop.googlecode.com/ psinsights - http://psinsights.googlecode.com/ synthclone - http://synthclone.googlecode.com/ _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@email-addr-hidden http://lists.linuxaudio.org/listinfo/linux-audio-devReceived on Sun May 18 16:15:02 2014
This archive was generated by hypermail 2.1.8 : Sun May 18 2014 - 16:15:02 EEST