How to print full path for libs using otool?

646 Views Asked by At

otool show me paths with @rpath, how can I expand @rpath to get full path?

otool -L my_lib.so | grep opencv

@rpath/libopencv_objdetect.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_video.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_calib3d.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_features2d.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_highgui.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_videoio.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_imgcodecs.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_imgproc.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_flann.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)
@rpath/libopencv_core.3.4.dylib (compatibility version 3.4.0, current version 3.4.1)

otool -l my_lib.so | grep opencv

     name @rpath/libopencv_objdetect.3.4.dylib (offset 24)
     name @rpath/libopencv_video.3.4.dylib (offset 24)
     name @rpath/libopencv_calib3d.3.4.dylib (offset 24)
     name @rpath/libopencv_features2d.3.4.dylib (offset 24)
     name @rpath/libopencv_highgui.3.4.dylib (offset 24)
     name @rpath/libopencv_videoio.3.4.dylib (offset 24)
     name @rpath/libopencv_imgcodecs.3.4.dylib (offset 24)
     name @rpath/libopencv_imgproc.3.4.dylib (offset 24)
     name @rpath/libopencv_flann.3.4.dylib (offset 24)
     name @rpath/libopencv_core.3.4.dylib (offset 24)

-l Display the load commands.

-L Display the names and version numbers of the shared libraries that the object file uses, as well as the shared library ID if the file is a shared library.

0

There are 0 best solutions below