[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to determine the filename for dlopen()



Hi,

I'm packaging a program which wants to dlopen() some library.  It finds
this library via pkg-config (PKG_CHECK_MODULES).  How to best determine
the filename to use in the dlopen() call?  It should work cross-distro,
for cross-compilation and whatnot.  Is it always safe to use the SONAME
as the filename?  I'm currently considering something like

ld -shared -o dummy.so $(my_LIBS)
objdump -p dummy.so | fgrep NEEDED

coded up properly for Automake.  I'd be grateful for any insight.
-- 
Thanks,
Feri


Reply to: