OTB is a complex system, if you don’t believe it, look at the image here (click on it for a full view):
This image shows the dynamic dependencies of otb: the libraries required by each element. This image was generated using cmake:
cmake . --graphviz=otb-dep.dot dot -Tpng -ootb-dep.png otb-dep.dot
It is a very useful representation to understand the potential link problems and to find out where some cleaning is required…