1

I have simple C++ application that uses libxml2 library. For this purpose I need to install it. But which package I need to install:

sudo apt-get install libxml2

System still complains regarding missing libxml header file.

sudo apt-get install libxml2-dev

Builds fine.

What is difference between libxml2 and libxml2-dev packages?

vico
  • 4,717
  • 23
  • 66
  • 89

1 Answers1

3

libxml2 contains the library itself, so to speak. libxml2-dev contains specifically the header files for C (or in this case, C++) development. This principle holds for many other packages as well. For example, libmysqlclient21 contains the MySQL command line client library. If you want to use this library in your own code, you need to install the corresponding header files from the package libmysqlclient-dev.