In an embedded environment that I'm working in, the following files are present:
lrwxrwxrwx 1 root root 19 Aug 23 2016 /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1 -> libjsoncpp.so.1.7.4
-rw-r--r-- 1 root root 213728 Aug 23 2016 /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1.7.4
When I need to link an executable with -ljsoncpp
, I guess it's looking specifically for a file named libjsoncpp.so
. Note that this file (symlink) is absent above.
Question: Is there a utility that generates the correct shared library symlink according to standard naming convention? I.e. given the above two files, is there a utility that would generate the symlink:
lrwxrwxrwx 1 root root 19 Aug 23 2016 /usr/lib/x86_64-linux-gnu/libjsoncpp.so -> libjsoncpp.so.1
?
I know that I can generate the file with ln -s...
, but an offhanded comment I overheard led me to believe that there's a Linux utility that does this, and if so, I'd rather defer to an existing standard/widely used tool rather than manually doing it myself, i.e. to avoid pebkac errors like typos, etc. I have not been able to find any reference online to such a tool, and the original source I overheard the comment from is no longer available.