Print dlerror when unable to load plugin library.

git-svn-id: http://svn.drobilla.net/lad@170 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
dave 2006-10-14 19:33:54 +00:00
parent 71671b1cc1
commit 272c4e6bd2
1 changed files with 2 additions and 1 deletions

View File

@ -39,9 +39,10 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin,
if (!lib_path)
return NULL;
dlerror();
void* lib = dlopen((char*)lib_path, RTLD_NOW);
if (!lib) {
printf("Unable to open library %s\n", lib_path);
printf("Unable to open library %s (%s)\n", lib_path, dlerror());
return NULL;
}