send2vinnie / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

Linker Error #238

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When building my application named Victory, I get 2 linking errors when 
building my main.cc.  I've just tried to upgrade to pugixml 1.4 (from 1.0).  
The same behavior also happens with 1.2.  Here are the 2 errors:

../../lib/libvictory.so: undefined reference to `pugi::xml_node::operator 
pugi::xml_node_struct* pugi::xml_node::*() const'
../../lib/libvictory.so: undefined reference to `pugi::xml_attribute::operator 
pugi::xml_attribute_struct* pugi::xml_attribute::*() const'

My system is ubuntu 10.04 with gcc 4.4.3.  I am using the CMakeBuild system 
(although that is probably irrelevant)

I really don't even need those operators, but I can't find where they are 
defined in the header file to comment them out.  Or I wasn't able to stub them 
out in the cpp file.

Thanks

Original issue reported on code.google.com by markis...@gmail.com on 11 Sep 2014 at 8:47

GoogleCodeExporter commented 9 years ago
That is unexpected.

These operators are defined in pugixml.cpp:
    PUGI__FN xml_node::operator xml_node::unspecified_bool_type() const
    {
        return _root ? unspecified_bool_xml_node : 0;
    }

However, the type that you're quoting does not really make sense. In pugixml 
1.4 the type is defined as:

        typedef void (*unspecified_bool_type)(xml_node***);

What you're quoting reminds me of a version of this type that was used for a 
previous version of pugixml (1.0 if I'm not mistaken). So it looks like not all 
of the object files in libvictory.so got rebuild or something along these 
lines. Try doing a full rebuild?

Original comment by arseny.k...@gmail.com on 11 Sep 2014 at 9:40

GoogleCodeExporter commented 9 years ago

Original comment by arseny.k...@gmail.com on 27 Sep 2014 at 4:51

GoogleCodeExporter commented 9 years ago
Closing (assuming user error). Please comment if you still experience this 
issue.

Original comment by arseny.k...@gmail.com on 6 Oct 2014 at 1:31