I installed a library(for example
lzma-dev) using a package manager(for example
Ubuntu). How can I use it? Where can I find the
headers? How about
Assuming the package has already been installed you can see the contents of it using
dpkg -L, for list.
$ dpkg -L lzma-dev /. /usr /usr/include /usr/include/lzma /usr/include/lzma/LzHash.h /usr/include/lzma/Types.h /usr/include/lzma/LzmaEnc.h /usr/include/lzma/LzFind.c /usr/include/lzma/LzmaEnc.c /usr/include/lzma/LzFind.h /usr/include/lzma/LzmaDec.h /usr/include/lzma/7zVersion.h /usr/include/lzma/LzmaDec.c /usr/share /usr/share/doc /usr/share/doc/lzma-dev /usr/share/doc/lzma-dev/lzma.txt.gz /usr/share/doc/lzma-dev/Methods.txt /usr/share/doc/lzma-dev/7zC.txt.gz /usr/share/doc/lzma-dev/changelog.Debian.gz /usr/share/doc/lzma-dev/7zFormat.txt.gz /usr/share/doc/lzma-dev/copyright
Packages that are named
<something>-dev are typically just the C header files (
.h files), this package is a bit unusual in that it includes (
.h files). Incidentally this is the actual source for the LZMA library.
If you want the
.so files and the
.h files for the LZMA library, so you can compile against it, you'll need to install the 'liblzma-dev` package.
Here's the header files.
$ dpkg -L liblzma-dev | tail -15 /usr/include/lzma/version.h /usr/include/lzma/hardware.h /usr/include/lzma/index.h /usr/include/lzma/index_hash.h /usr/include/lzma/block.h /usr/include/lzma/delta.h /usr/include/lzma/check.h /usr/include/lzma/filter.h /usr/include/lzma/bcj.h /usr/include/lzma/base.h /usr/share/doc/liblzma-dev/NEWS.gz /usr/share/doc/liblzma-dev/AUTHORS /usr/share/doc/liblzma-dev/changelog.Debian.gz /usr/share/doc/liblzma-dev/THANKS /usr/lib/x86_64-linux-gnu/liblzma.so
As well as the actual
$ dpkg -L liblzma5 | tail -4 /lib /lib/x86_64-linux-gnu /lib/x86_64-linux-gnu/liblzma.so.5.0.0 /lib/x86_64-linux-gnu/liblzma.so.5
dpkg -L lzma-dev
list all the files installed with apt-get for