HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 SPARK2 libpugixml errors

View previous topic View next topic Go down 
AuthorMessage
thecno



Messages : 7
Date d'inscription : 2012-03-25

PostSubject: SPARK2 libpugixml errors   Fri Mar 30, 2012 1:38 pm

Hello,

I compiled latest version of SPARK2, but when I try to use the following
Code:

SPK::IO::Loader* loader = new SPK::IO::XMLLoader();

I get build errors:
Code:

/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::innerLoad(std::basic_istream<char, std::char_traits<char> >&, SPK::IO::Loader::Graph&) const':
SPK_IO_XMLLoader.cpp:(.text+0x3c): undefined reference to `pugi::xml_document::xml_document()'
SPK_IO_XMLLoader.cpp:(.text+0x6e): undefined reference to `pugi::xml_document::load(std::basic_istream<char, std::char_traits<char> >&, unsigned int, pugi::xml_encoding)'
SPK_IO_XMLLoader.cpp:(.text+0x7f): undefined reference to `pugi::xml_parse_result::operator bool() const'
SPK_IO_XMLLoader.cpp:(.text+0x98): undefined reference to `pugi::xml_parse_result::description() const'
SPK_IO_XMLLoader.cpp:(.text+0x154): undefined reference to `pugi::xml_document::document_element() const'
SPK_IO_XMLLoader.cpp:(.text+0x17b): undefined reference to `pugi::xml_node::operator!() const'
SPK_IO_XMLLoader.cpp:(.text+0x18d): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0x354): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0x561): undefined reference to `pugi::xml_document::~xml_document()'
SPK_IO_XMLLoader.cpp:(.text+0x57b): undefined reference to `pugi::xml_document::~xml_document()'
/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::getValue(pugi::xml_node const&) const':
SPK_IO_XMLLoader.cpp:(.text+0x5bf): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0x5cd): undefined reference to `pugi::xml_attribute::operator!() const'
SPK_IO_XMLLoader.cpp:(.text+0x5e9): undefined reference to `pugi::xml_node::child_value() const'
SPK_IO_XMLLoader.cpp:(.text+0x63e): undefined reference to `pugi::xml_attribute::value() const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::getRef(pugi::xml_node const&, std::map<int, unsigned int, std::less<int>, std::allocator<std::pair<int const, unsigned int> > > const&, SPK::IO::Loader::Graph const&) const':
SPK_IO_XMLLoader.cpp:(.text+0x6bb): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0x6c9): undefined reference to `pugi::xml_attribute::value() const'
SPK_IO_XMLLoader.cpp:(.text+0x729): undefined reference to `pugi::xml_node::child_value() const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::getObject(pugi::xml_node const&, std::vector<pugi::xml_node, std::allocator<pugi::xml_node> > const&, SPK::IO::Loader::Graph const&) const':
SPK_IO_XMLLoader.cpp:(.text+0x86c): undefined reference to `pugi::xml_node::operator pugi::xml_node_struct* pugi::xml_node::*() const'
SPK_IO_XMLLoader.cpp:(.text+0x8a0): undefined reference to `pugi::xml_node::operator==(pugi::xml_node const&) const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::findObjects(pugi::xml_node const&, std::vector<pugi::xml_node, std::allocator<pugi::xml_node> >&, std::map<int, unsigned int, std::less<int>, std::allocator<std::pair<int const, unsigned int> > >&, bool) const':
SPK_IO_XMLLoader.cpp:(.text+0x934): undefined reference to `pugi::xml_node::first_child() const'
SPK_IO_XMLLoader.cpp:(.text+0x964): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0x9b7): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0xb14): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0xb22): undefined reference to `pugi::xml_attribute::operator pugi::xml_attribute_struct* pugi::xml_attribute::*() const'
SPK_IO_XMLLoader.cpp:(.text+0xb4a): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0xb58): undefined reference to `pugi::xml_attribute::as_int() const'
SPK_IO_XMLLoader.cpp:(.text+0xc52): undefined reference to `pugi::xml_node::next_sibling() const'
SPK_IO_XMLLoader.cpp:(.text+0xc66): undefined reference to `pugi::xml_node::operator pugi::xml_node_struct* pugi::xml_node::*() const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLLoader.cpp.o): In function `SPK::IO::XMLLoader::parseAttributes(pugi::xml_node const&, SPK::IO::Descriptor&, SPK::IO::Loader::Graph const&, std::vector<pugi::xml_node, std::allocator<pugi::xml_node> > const&, std::map<int, unsigned int, std::less<int>, std::allocator<std::pair<int const, unsigned int> > > const&) const':
SPK_IO_XMLLoader.cpp:(.text+0xcb0): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0xcbe): undefined reference to `pugi::xml_attribute::value() const'
SPK_IO_XMLLoader.cpp:(.text+0xdbe): undefined reference to `pugi::xml_node::first_child() const'
SPK_IO_XMLLoader.cpp:(.text+0xdd1): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0xe70): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLLoader.cpp:(.text+0xe7e): undefined reference to `pugi::xml_attribute::value() const'
SPK_IO_XMLLoader.cpp:(.text+0x110f): undefined reference to `pugi::xml_node::first_child() const'
SPK_IO_XMLLoader.cpp:(.text+0x11e0): undefined reference to `pugi::xml_node::first_child() const'
SPK_IO_XMLLoader.cpp:(.text+0x11fe): undefined reference to `pugi::xml_node::name() const'
SPK_IO_XMLLoader.cpp:(.text+0x1398): undefined reference to `pugi::xml_node::next_sibling() const'
SPK_IO_XMLLoader.cpp:(.text+0x13ac): undefined reference to `pugi::xml_node::operator pugi::xml_node_struct* pugi::xml_node::*() const'
SPK_IO_XMLLoader.cpp:(.text+0x1512): undefined reference to `pugi::xml_node::next_sibling() const'
SPK_IO_XMLLoader.cpp:(.text+0x1526): undefined reference to `pugi::xml_node::operator pugi::xml_node_struct* pugi::xml_node::*() const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::innerSave(std::basic_ostream<char, std::char_traits<char> >&, SPK::IO::Saver::Graph&) const':
SPK_IO_XMLSaver.cpp:(.text+0x3b): undefined reference to `pugi::xml_document::xml_document()'
SPK_IO_XMLSaver.cpp:(.text+0x145): undefined reference to `pugi::xml_node::append_child(pugi::xml_node_type)'
SPK_IO_XMLSaver.cpp:(.text+0x15a): undefined reference to `pugi::xml_node::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x1ef): undefined reference to `pugi::xml_node::append_child(pugi::xml_node_type)'
SPK_IO_XMLSaver.cpp:(.text+0x204): undefined reference to `pugi::xml_node::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x277): undefined reference to `pugi::xml_node::append_child(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x34d): undefined reference to `pugi::xml_document::save(std::basic_ostream<char, std::char_traits<char> >&, char const*, unsigned int, pugi::xml_encoding) const'
SPK_IO_XMLSaver.cpp:(.text+0x38e): undefined reference to `pugi::xml_document::~xml_document()'
SPK_IO_XMLSaver.cpp:(.text+0x3a8): undefined reference to `pugi::xml_document::~xml_document()'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::getAttribute(pugi::xml_node&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
SPK_IO_XMLSaver.cpp:(.text+0x3f1): undefined reference to `pugi::xml_node::attribute(char const*) const'
SPK_IO_XMLSaver.cpp:(.text+0x3ff): undefined reference to `pugi::xml_attribute::operator!() const'
SPK_IO_XMLSaver.cpp:(.text+0x421): undefined reference to `pugi::xml_node::append_attribute(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x444): undefined reference to `pugi::xml_node::attribute(char const*) const'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::writeValue(pugi::xml_node&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
SPK_IO_XMLSaver.cpp:(.text+0x4c4): undefined reference to `pugi::xml_attribute::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x537): undefined reference to `pugi::xml_node::append_child(pugi::xml_node_type)'
SPK_IO_XMLSaver.cpp:(.text+0x549): undefined reference to `pugi::xml_node::set_value(char const*)'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::writeRef(pugi::xml_node&, SPK::IO::Saver::Node const&) const':
SPK_IO_XMLSaver.cpp:(.text+0x5eb): undefined reference to `pugi::xml_attribute::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x658): undefined reference to `pugi::xml_node::append_child(pugi::xml_node_type)'
SPK_IO_XMLSaver.cpp:(.text+0x66a): undefined reference to `pugi::xml_node::set_value(char const*)'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::writeObject(pugi::xml_node&, SPK::Ref<SPK::SPKObject> const&, SPK::IO::Saver::Graph&, bool) const':
SPK_IO_XMLSaver.cpp:(.text+0x791): undefined reference to `pugi::xml_node::append_child(char const*)'
/usr/local/lib//libSPARK.a(SPK_IO_XMLSaver.cpp.o): In function `SPK::IO::XMLSaver::writeNode(pugi::xml_node&, SPK::IO::Saver::Node const&, SPK::IO::Saver::Graph&) const':
SPK_IO_XMLSaver.cpp:(.text+0x834): undefined reference to `pugi::xml_node::append_child(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x922): undefined reference to `pugi::xml_attribute::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x9ab): undefined reference to `pugi::xml_node::append_child(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x9dd): undefined reference to `pugi::xml_node::append_attribute(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x9ef): undefined reference to `pugi::xml_attribute::set_value(char const*)'
SPK_IO_XMLSaver.cpp:(.text+0x1538): undefined reference to `pugi::xml_attribute::set_value(char const*)'
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: SPARK2 libpugixml errors   Sat Mar 31, 2012 5:36 am

Thank you for the report. This bug is already known (and is on my todo-list Wink ).

Do you use gcc via command line or Code::Blocks ? Maybe you could try to add libpugixml to the list of libs to link. Normally, it is generated in SPARK_2_DIR/external/pugixml/bin.

There is a bug in the CMake script that affect only gcc generator (and MinGW generator), the lib seems to be built when needed (normal behavior) but the script fails to indicate the correct path to the lib.

_________________
Back to top Go down
View user profile
thecno



Messages : 7
Date d'inscription : 2012-03-25

PostSubject: Re: SPARK2 libpugixml errors   Sat Mar 31, 2012 9:58 am

I used command line to build the project. (Linux - GCC 4.4.5)
Both libSPARK.a and libpugixml.a are build succesfully according cmake.

If I add pugixml to the libraries for the GCC linker, I still get the same error Crying or Very sad
Is there another workaround ? So I can atleast test SPARK2 in my project Very Happy


EDIT:


Managed to build my test project by changing the order of the libraries:
SPARK_IRR
SPARK
pugixml


I noticed the correct linking order is very important!


Thnx for the quick reply
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: SPARK2 libpugixml errors   Sat Mar 31, 2012 1:48 pm

Ok, thank you, I think you corrected the bug! I checked on the net and saw that GCC linker uses a very stupid algorithm in 1 pass, thus I must change the link order and add externals at last.

Will test it further.

_________________
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: SPARK2 libpugixml errors   Today at 9:26 am

Back to top Go down
 
SPARK2 libpugixml errors
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Selenium RC; Permission denied on session.([error] Element not found ")
» Can I check the error message displayed or not in Selenium?
» Getting error when i run selenium script in Eclipse, please help
» XHTML - Lesson 5/5
» iexpoloreproxy https certificate error

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: