How to make sure a symbol is present in the library used at run-time



Hi,
I need to build an app which needs a symbol from Pango library which exists only in some newer versions.

Since pango_version_check is not available on older pangos, and I want my app to run on all systems regardless of their pango version (since the symbol I need is not crucial), I'd like to pose the following question:

How do I make sure that a symbol is in the Pango lib loaded at runtime (I want to link my app against shared libs - i.e. DSO) used at runtime?

I'd normally use dlopen() but given the LD_LIBRARY_PATH, RPATH and RUNPATH mess, how do I know for sure which lib is being used by my application?

The only solution I can think of is parsing the /proc/self/maps resource and look at it... do you know a better solution?

Thanks,
Francesco Montorsi

--





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