Re: Compiler Errors
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Santhosh Edukulla <santhosh edukulla gmail com>
- Cc: libxmlplusplus-list gnome org
- Subject: Re: Compiler Errors
- Date: Wed, 16 May 2012 18:39:53 +0200
2012-05-16 16:00, Santhosh Edukulla skrev:
Hi All,
I have installed libxml++ from below link:
1/ When i compile my code file using the command below (EX), It works fine :
g++ -g res_parser.cpp -o program `pkg-config --cflags --libs libxml++-2.6`
2/ But, when i run like below. It gives tons of errors.
g++ -g res_parser.cpp -o program
Few of the errors are below:
/usr/include/libxml++/validators/dtdvalidator.h:24: error: expected
‘,’ or ‘...’ before ‘::’ token
/usr/include/libxml++/validators/dtdvalidator.h:25: error: expected
‘,’ or ‘...’ before ‘::’ token
/usr/include/libxml++/validators/dtdvalidator.h:25: error:
‘xmlpp::DtdValidator::DtdValidator(int)’ cannot be overloaded
/usr/include/libxml++/validators/dtdvalidator.h:24: error: with
‘xmlpp::DtdValidator::DtdValidator(int)’
/usr/include/libxml++/validators/dtdvalidator.h:28: error: expected
‘,’ or ‘...’ before ‘::’ token
/usr/include/libxml++/validators/dtdvalidator.h:29: error: expected
‘,’ or ‘...’ before ‘::’ token
/usr/include/libxml++/validators/dtdvalidator.h:30: error: expected
‘,’ or ‘...’ before ‘::’ token
Any idea as to why these errors are?
Thanks in Advance!
Santhosh
These errors (at least the first few, I didn't check all of them) comes
from lines where Glib::ustring is mentioned. Some of the libxml++ header
files include <glibmm/ustring.h>, and without `pkg-config --cflags
--libs libxml++-2.6` g++ can't find that file.
What makes you think that you should be able to compile and link without
`pkg-config --cflags --libs libxml++-2.6`? Is there any documentation
that says so? In that case, it's wrong. Or what's the problem with
including `pkg-config --cflags --libs libxml++-2.6` in the g++ command?
You can store it in a makefile or a shell script. You don't have to
write it every time you compile your program.
Kjell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]