>> you probably are calling alsa from a shared object -- try >> >> dlopen ("libasound.so", RTLD_LAZY | RTLD_GLOBAL); >> >> in your module's init function. > >The need for RTLD_GLOBAL is somewhat ugly, usually one wants to load >plugins with RTLD_LOCAL.
the suggestion is not that *your* plugin should use RTLD_GLOBAL, but that RTLD_GLOBAL needs to be used when alsa-lib is linked into the address space. if you don't use RTLD_GLOBAL, then the symbols in libasound are not availble for subsequently-loaded dynamically linked code. >Is there any reason ALSA can't do something like > > if (name == NULL) { > Dl_info dlinfo; > static int dummy; > dladdr((void *) &dummy, &dlinfo); > name = dlinfo.dli_fname; > } perhaps because this implementation of dlopen is platform specific? the dladdr function and the dlinfo structure are not present in my version of glibc, at least not as far as i can tell. --p ------------------------------------------------------- Sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel