/usr/lib/x86_64-linux-gnu contains over 1000 useful libraries. One expects to be able to access them using the -l option in gcc where
-lfoo
means "insert library libfoo.so
".
But many common libraries don't have .so
at the end of their names; for example -ltiff
does not work (in spite of appearing in umpteen Makefiles for free software). The reason is that all that is provided is
libtiff.so.5 which is a soft link to
libtiff.so.5.3.0
there is no libtiff.so
which would be a soft link to libtiff.so.5
. Likewise -ljpeg' does not work (and there are dozens of others), but
-lpng` if fine becuase it provides
libpng.so which is a soft link to
libpng16.so which is a soft link to
libpng16.so.16.34.0
Why can't all libraries be provided in that form?
/usr/lib/x86_64-linux-gnu/libtiff.so
should be a symbolic link to your/usr/lib/x86_64-linux-gnu/libtiff.so.5.3.0
file. Is the corresponding development package (i.e.libtiff5-dev
) installed on your system? – steeldriver Sep 19 '20 at 23:42pkg-config
help you to find needed library and headers? – N0rbert Sep 20 '20 at 8:32