How do I find out what DLLs an executable depends on?
On systems with the GNU development toolchain (gcc &c) I use ldd for that, but what about the clang systems, like, e.g., Mac OS X (which does not have ldd)?
How do I find out what DLLs an executable depends on?
On systems with the GNU development toolchain (gcc &c) I use ldd for that, but what about the clang systems, like, e.g., Mac OS X (which does not have ldd)?
On Mac OSX, you'd use otool -L instead of ldd. This works regardless of the compiler you used. Other operating systems may have yet other tools; e.g. on Windows you'd use Dependency Walker.
llvm-readelf ---needed-libs is the clang analogue of ldd. Here's is the official documentation
~/weechat $ llvm-readelf --needed-libs bin/weechat
NeededLibraries [
libc.so
libcurl.so
libdl.so
libgcrypt.so
libgnutls.so
libgpg-error.so
libiconv.so
libm.so
libncursesw.so.6
]