How can I find the dynamic libraries required by an ELF Binary in C++?

view story

http://stackoverflow.com – How can I get a list of all the dynamic libraries that is required by an elf binary in linux using C++? Once I've managed to extract the information (filename?) from the binary I can find the actual file by searching through the PATH, but I haven't been able to find any information regarding extracting unmangled information from the ELF binary. Thoughts? (HowTos)