I'm confused as to how to use *-dev
packages in Ubuntu.
I want to use the libxml2
library, in Ubuntu, for my own code development. I installed libxml2-dev using apt-get
, which put the header files in the /usr/include/libxml2/libxml
.
In order to include a header file, e.g. parse.h
, I have to use the following path libxml2/libxml/parser.h
. That works fine, but then I run into a cascade of problems.
parse.h
, as written by the developer, include another header libxml/xmlversion.h
. Unfortunately, that path is NOT consistent with how this -dev
package headers files are stored in Ubuntu. That is, xmlversion.h
needs to be called (at least by my program) as libxml2/libxml/xmlversion.h
.
Likewise, xmlversion.h
calls a header libxml/xmlexports.h
which also not in the default search path, creating a cascading series of "No such file" errors.
I assume that I could solve this problem by manually specifying the search path to include /usr/local/libxml2
, but this would seem to negate the benefit of using a package manager like apt-get
. At the very least, I assume the package manager, when installing a *-dev
package, will properly configure the compiler search paths
What am I missing in terms of using *-dev
packages? Is this normal behavior or a specific problem to libxml2-dev
? What does apt
package manager expect me to do after installing an *-dev
package?