Re: Compiler Errors



Hi Kjell,

Thanks for the info. As well what is the diff between textnode\content node?

Iam trying to add some thing like this. I already have f in my xml. Is
f1 a text\content node?

Iam using add_child("f1") and then setting text using set_child_text("abc");

Is it right?

<f>
<f1>abc</f1>
</f>

Santhosh

On 5/17/12, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
> 2012-05-16 19:19, Santhosh Edukulla skrev:
>> 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?
> Of course the C++ wrappers add some extra overhead, both in execution
> time and memory footprint, but I don't think you need to worry about
> that. The overhead is small. It's the same technique that's used in
> several other packages, e.g. in gtkmm which contains C++ wrappers for
> the C functions in gtk+.
> A can't think of any conflicts with libxml (libxml2). libxml++ itself
> depends on it, and calls its functions. If you have other xml libraries
> installed, I suppose name collisions would be possible, but improbable.
>>
>> 2. I hope it is open source and available under GPL?
> Yes, it's open source. libxml++ and most of the packages it depends on
> are available under LGPL. The exception is the C library libxml2, which
> is available under the MIT license
> (http://www.opensource.org/licenses/mit-license.html).
>>
>> 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]