Re: Compiler Errors



Actually iam doing the same i.e., using a makefile and provided the
additional args as below.

I was under assumption that i have configured something wrong and it
was not able to detect the relevant includes for compiling.

Any ways, thats ok. I have few other questions though:

1. We have a libxml lib written in c and are using all these days
through a wrapper. I found this to be very simple and interesting. If
we provide this lib as part of our production environment, will there
be any issues in terms of footprint size for this? Also, any conflicts
with base libxml packages already there?

2. I hope it is open source and available under GPL?

Thanks in Advance!
Santhosh
On 5/16/12, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
> 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]