On Wednesday 28 November 2001 23.19, you wrote: > >gcc -O2 -Wall -fPIC -c bfio_alsa.c > >ld -shared -o alsa.bfio bfio_alsa.o -lasound > > i don't think you can't build shared libraries like this unless you > have the right kind of object for libasound, and i'm not sure that > *.so is not the right kind of object. > > it seems that you're trying to express a dependency between your new > shared library, alsa.bfio, and the existing shared library > libasound.so. you don't need to do that.
Right, thanks. Removed that. > >ld -shared -static -o alsa.bfio bfio_alsa.o -lasound > > this seems nonsensical. -shared -static cancel each other, right? this > is just linking everything needed from libasound.a into the static > library alsa.bfio. Well, actually you can do this. -static says -lasound should be included in the binary, and -shared says that alsa.bfio should be a shared library, but as you said, it is nonsense to express a dependency to libasound, since it is taken care of by the dynamic linker. > ALSA uses dlopen itself, yes. Anything else that tries to dlopen() > libasound must use the RTLD_GLOBAL flag on dlopen() so that all > symbols are resolved. This is a general problem with dlopen()-ing code > that itself uses dlopen(). I don't know if link-time shared object > construction can deal this or not. Ahh, I didn't use the RTLD_GLOBAL flag, that was the problem (I didn't realise that it should be or'd together with RTLD_LAZY or RTLD_NOW). It started to work right away with that added. Thanks. /Anders Torger _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel