I'm making a software which will be using ALSA through a plugin implemented as a shared library. The idea is that the main software has no sound-API specific code whatsoever, and that one can easily write a plugin which is loaded in runtime to provide support for ALSA, OSS, file or whatever.
The ALSA plugin is compiled with gcc -O2 -Wall -fPIC -c bfio_alsa.c ld -shared -o alsa.bfio bfio_alsa.o -lasound It works loading this plugin with dlopen in the main program, but then ALSA fails in dlmisc.c, ALSA lib dlmisc.c:94:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load: /usr/lib/libasound.so.2: undefined symbol: _snd_config_hook_load_dlsym_config_hook_001 (I have added the dlerror() print, which is not available in the original error message) If I instead link the plugin with ld -shared -static -o alsa.bfio bfio_alsa.o -lasound I get it to work, or if I link the the main executable dynamically with ALSA. I am new to using dlopen(), but it seems to me like the problem could be that ALSA fetches the handle for the main executable, which in this case is not linked with ALSA. Any suggestions? Could this be a problem with how ALSA uses dlopen, making it impossible to make shared libraries that dynamically links to ALSA? /Anders Torger _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel