0

The library I am using is libndpi.so. When I run ldconfig, the link is created like so

libndpi.so.1 => libndpi.so

However, this library is referenced in our code as libndpi.so. Is there a way to add libndpi.so to the shared library cache instead of libndpi.so.1?

djpcoc
  • 17
  • 3
  • I tried referencing the path using LD_LIBRARY_PATH but couldn't get it working so I am looking for an alternative way. – djpcoc Mar 06 '17 at 09:56
  • Your libndpi.so should have SONAME of libndpi.so.1, and when you link your application with `-lndpi`, actual name of the needed library in the generated ELF will be as stored in SONAME of libndpi.so, which should be "libndpi.so.1". Check http://stackoverflow.com/a/14613602 & http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html "3.1.1. Shared Library Names". And check output of `ldd ./your_program` (or `readelf -e ./your_program`) to see actual used name. – osgx Mar 15 '17 at 15:47

0 Answers0