Re: If libxml2 headers refer to libxml/*.h, why is it installed into libxml2/libxml?

Jefferson Carpenter <[email protected]> Wed, 12 Feb 2020 17:32:26 +0000
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
It wouldn't break the majority of software projects to change the libxml2 headers to include each other by the path `libxml2/libxml` instead of just by `libxml`.  Most configurations will have `/include` in the header search directories prior to `include/libxml2` which would have been added to use/switch to libxml2.



Jefferson


---- On Tue, 11 Feb 2020 21:25:58 +0000 Csaba Raduly <[email protected]> wrote ----


You have to use -I $HOME/local/include/libxml2. On Linux systems and Cygwin, the system's built-in libxml2 places its headers in /usr/include/libxml2/libxml and you have to use -I /usr/include/libxml2



libxml2 is weird like that :) . You just have to live with it.



(Perhaps libxml2 is set up like this to be source-compatible with libxml1, so programs which e.g. #include <libxml/SAX.h> can be compiled without modifying the source, just by adding an extra compiler switch. But I'm just speculating.)



Csaba



On Tue, Feb 11, 2020 at 9:57 PM Jefferson Carpenter <mailto:[email protected]> wrote:

This is after running



    ./configure --prefix="$HOME/local" --with-python-install-dir="$HOME/local"

    make
    make install

and compiling my program with

    -I"$HOME/local/include"

No other libraries that I use ask me to add additional include directories to my compiler search paths (including boost, libxslt, postgresql, openssl).





-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml