Re: [xml] Compile gjobread.c in libxml2-2.5.10



On Mon, 2004-02-09 at 07:08, T K wrote:
Hi,
 
I have just installed the above library and want to
get started. Im
using the example gjobread.c from the examples
folder but when I
compile it normally Im getting errors. Any ideas?
Also, I want to
store data in xml but have no idea how to begin
doing this. Would
anyone be able to help me in this regard. Thanks in
advance.

You have not provided any information about what your
problem is. How
are compiling this program and what errors are you
seeing?

Malcolm

It cant find <libxml/xmlmemory.h> and 
<libxml/parser.h>. I think not finding these files
caused the rest of the errors.

That would certainly cause errors. So the solution to your problem is to
make sure these files are visible to the build process.

However, again you have been short on the information you provide so I
cannot really say where the problem lies. My question about how you were
compiling your program was important, since that is almost certainly
where the problem lies. You should probably be doing something like

gcc -o gjobread $(pkg-config --cflags --libs libxml-2.0) gjobread.c

in order to ensure that the include paths and linking paths are set
correctly. This assumes that pkg-config finds the libxml-2.0.pc file you
have just installed. If it doesn't you will need to set PKG_CONFIG_PATH
to point to the $prefix/lib/pkgconfig directory (where $prefix is
whatever prefix you installed libxml2 under).

If you are already doing all this, then you are going to need to provide
more precise information.

Malcolm



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