link the lib with its dependencies, not the resulting binary