forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using TinyXML in my project

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sionlord



Joined: 09 Mar 2010
Posts: 10

PostPosted: Mon May 03, 2010 7:14 am    Post subject: Using TinyXML in my project Reply with quote

Hi!

I've written a post asking how could I use ticpp in PSP (geting answers but not working). Then, I realized that there is already a XML parser for PSP: TinyXML version (ticpp derives from it).

I couldn't found where the library for psp was but I found a forum message saying that it was in the wagic project. I took the source code from there but it doesn't compile.

My makefile:

Code:
TARGET = prueba
OBJS   = src/main.o \
      src/tinyxml/tinystr.o src/tinyxml/tinyxml.o \
      src/tinyxml/tinyxmlparser.o src/tinyxml/tinyxmlerror.o
   
INCDIR   =
CFLAGS   = -G0 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS  = $(CFLAGS)
 
LIBDIR  =
LDFLAGS =
LIBS    = -lm
 
BUILD_PRX = 1
 
EXTRA_TARGETS   = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
 
include $(PSPSDK)/lib/build.mak


My main.cpp:

Code:

#include <pspkernel.h>
#include "tinyxml/tinyxml.h"

using namespace std;

int main(void){

   TiXmlDocument doc("personaje.xml");
   
   return 0;
}


My error message:

Code:

...

(IT'S TOO LONG)

...

tinyxmlparser.cpp:(.text+0x226c): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x22c4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()' sin definir
tinyxmlparser.cpp:(.text+0x2300): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()' sin definir
tinyxmlparser.cpp:(.text+0x2390): referencia a `std::__throw_out_of_range(char const*)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlText::StreamIn(std::basic_istream<char, std::char_traits<char> >*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
tinyxmlparser.cpp:(.text+0x2420): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2450): referencia a `std::basic_istream<char, std::char_traits<char> >::get()' sin definir
tinyxmlparser.cpp:(.text+0x2470): referencia a `std::basic_istream<char, std::char_traits<char> >::peek()' sin definir
tinyxmlparser.cpp:(.text+0x24ec): referencia a `std::basic_istream<char, std::char_traits<char> >::get()' sin definir
tinyxmlparser.cpp:(.text+0x2520): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2564): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::at(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x25a4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::at(unsigned int)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlElement::StreamIn(std::basic_istream<char, std::char_traits<char> >*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
tinyxmlparser.cpp:(.text+0x2610): referencia a `std::basic_istream<char, std::char_traits<char> >::get()' sin definir
tinyxmlparser.cpp:(.text+0x2650): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x26e4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()' sin definir
tinyxmlparser.cpp:(.text+0x2724): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()' sin definir
tinyxmlparser.cpp:(.text+0x2770): referencia a `std::basic_istream<char, std::char_traits<char> >::peek()' sin definir
tinyxmlparser.cpp:(.text+0x2834): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::at(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x286c): referencia a `std::basic_istream<char, std::char_traits<char> >::peek()' sin definir
tinyxmlparser.cpp:(.text+0x28a4): referencia a `std::basic_istream<char, std::char_traits<char> >::peek()' sin definir
tinyxmlparser.cpp:(.text+0x28ec): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x291c): referencia a `std::basic_istream<char, std::char_traits<char> >::get()' sin definir
tinyxmlparser.cpp:(.text+0x29cc): referencia a `std::__throw_out_of_range(char const*)' sin definir
tinyxmlparser.cpp:(.text+0x2a0c): referencia a `std::basic_istream<char, std::char_traits<char> >::get()' sin definir
tinyxmlparser.cpp:(.text+0x2a24): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlBase::ReadText(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool, char const*, bool, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x2aa4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2b70): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2c28): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2cb8): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)' sin definir
tinyxmlparser.cpp:(.text+0x2cf0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)' sin definir
tinyxmlparser.cpp:(.text+0x2da0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlText::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x2e38): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x2eb8): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text+0x2ebc): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text+0x2f28): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x3030): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlComment::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x3088): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlAttribute::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x32e0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)' sin definir
tinyxmlparser.cpp:(.text+0x3338): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlDeclaration::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x34a4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x34bc): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x34d0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x34f0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text+0x34f4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text+0x3590): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x3688): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x36c0): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text+0x3780): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
tinyxmlparser.cpp:(.text+0x37b8): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text+0x37f4): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text+0x3810): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text+0x3830): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text+0x3850): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlDocument::~TiXmlDocument()':
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD0Ev[TiXmlDocument::~TiXmlDocument()]+0x18): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD0Ev[TiXmlDocument::~TiXmlDocument()]+0x20): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD0Ev[TiXmlDocument::~TiXmlDocument()]+0x38): referencia a `operator delete(void*)' sin definir
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD0Ev[TiXmlDocument::~TiXmlDocument()]+0x60): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlDocument::~TiXmlDocument()':
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD1Ev[TiXmlDocument::~TiXmlDocument()]+0x18): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD1Ev[TiXmlDocument::~TiXmlDocument()]+0x20): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN13TiXmlDocumentD1Ev[TiXmlDocument::~TiXmlDocument()]+0x58): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlAttribute::~TiXmlAttribute()':
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD0Ev[TiXmlAttribute::~TiXmlAttribute()]+0xc): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD0Ev[TiXmlAttribute::~TiXmlAttribute()]+0x24): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD0Ev[TiXmlAttribute::~TiXmlAttribute()]+0x50): referencia a `operator delete(void*)' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD0Ev[TiXmlAttribute::~TiXmlAttribute()]+0x7c): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD0Ev[TiXmlAttribute::~TiXmlAttribute()]+0x98): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlAttribute::~TiXmlAttribute()':
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD1Ev[TiXmlAttribute::~TiXmlAttribute()]+0xc): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD1Ev[TiXmlAttribute::~TiXmlAttribute()]+0x24): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD1Ev[TiXmlAttribute::~TiXmlAttribute()]+0x74): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
tinyxmlparser.cpp:(.text._ZN14TiXmlAttributeD1Ev[TiXmlAttribute::~TiXmlAttribute()]+0x90): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)' sin definir
src/tinyxml/tinyxmlparser.o: En la función `TiXmlText::TiXmlText(char const*)':
tinyxmlparser.cpp:(.text._ZN9TiXmlTextC1EPKc[TiXmlText::TiXmlText(char const*)]+0x3c): referencia a `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)' sin definir
src/tinyxml/tinyxmlerror.o: En la función `global constructors keyed to _ZN9TiXmlBase11errorStringE':
tinyxmlerror.cpp:(.text+0x10): referencia a `std::ios_base::Init::Init()' sin definir
tinyxmlerror.cpp:(.text+0x18): referencia a `std::ios_base::Init::~Init()' sin definir
tinyxmlerror.cpp:(.text+0x2c): referencia a `std::ios_base::Init::~Init()' sin definir
collect2: ld devolvió el estado de salida 1
make: *** [prueba.elf] Error 1


Can anyone please help me? Thanks.
Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Mon May 03, 2010 11:55 am    Post subject: Reply with quote

link the c++ library
Back to top
View user's profile Send private message
willow :--)



Joined: 13 Jan 2007
Posts: 126

PostPosted: Mon May 03, 2010 12:37 pm    Post subject: Reply with quote

as jsharrad said, you're missing
-lstdc++
in your Makefile
_________________
Wagic. Play that card game against an AI on your PSP
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group