On Sat, May 17, 2014 at 10:07 PM, Zlobin Nikita <cook60020tmp(a)mail.ru> 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/