Re: [libxml++] compile libxml++ TextReader example



On Fri, 2007-06-01 at 12:29 -0400, Fei Liu wrote:
> Hello, I am trying to compile the libxml++ 2.4 textReader parser 
> example, here is what I did:
> g++ -I/usr/include/libxml++-2.6 -I/usr/include/glibmm-2.4 
> -I/usr/include/glib-2.0 -o main main.cpp -lxml++

You can get the correct include and linking options by using pkg-config,
as described here:
http://libxmlplusplus.sourceforge.net/docs/manual/html/index.html#id2472502

> I got the following error. I am new to libxml++, how exactly do I 
> compile the example? I have all the required packages installed but yet 
> it seems I am missing some header files such as glibconfig.h
> 
> In file included from /usr/include/glib-2.0/glib/gquark.h:30,
> from /usr/include/glib-2.0/glib/gerror.h:24,
> from /usr/include/glib-2.0/glib/gunicode.h:25,
> from /usr/include/glibmm-2.4/glibmm/ustring.h:25,
> from /usr/include/libxml++-2.6/libxml++/exceptions/exception.h:26,
> from /usr/include/libxml++-2.6/libxml++/exceptions/internal_error.h:25,
> from /usr/include/libxml++-2.6/libxml++/libxml++.h:10,
> from main.cpp:26:
> /usr/include/glib-2.0/glib/gtypes.h:30:24: error: glibconfig.h: No such 
> file or directory
[snip]

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]