azraelly / ticpp

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

TinyXML++ on the PSP. #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2  -I. -
I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2  -fno-exceptions -fno-rtti -
D_PSP_FW_VERSION=150   -c -o main.o main.cpp

What is the expected output? What do you see instead?
I expected the program to compile properly. Instead, I see:

/usr/local/pspdev/psp/sdk/include/ticpp.h: In member function 'T* 
ticpp::Node::To() const':
/usr/local/pspdev/psp/sdk/include/ticpp.h:886: error: cannot use typeid with 
-fno-rtti
/usr/local/pspdev/psp/sdk/include/ticpp.h:887: error: cannot use typeid with 
-fno-rtti
/usr/local/pspdev/psp/sdk/include/ticpp.h:888: error: cannot use typeid with 
-fno-rtti
/usr/local/pspdev/psp/sdk/include/ticpp.h: In constructor 
'ticpp::NodeImp<T>::NodeImp(T*)':
/usr/local/pspdev/psp/sdk/include/ticpp.h:1217: error: cannot use typeid with 
-fno-rtti
main.cpp: In function 'int main(int, char**)':
main.cpp:38: error: invalid conversion from 'ticpp::Node*' to 'ticpp::Element*'
make: *** [main.o] Error 1

What version of the product are you using? On what operating system?
TinyXML++ 2.5.3 on Mac OSX 10.5 ( Leopard )

Please provide any additional information below.

Makefile.psp

# Makefile.psp by Giancarlo Canales (neko-grafico@hotmail.com)

TICPP= .

PSPSDK = $(shell psp-config --pspsdk-path)
PSPDIR = $(shell psp-config --psp-prefix)

CFLAGS = -O2 -G0 -I$(LUA)/include

OBJS = ticpp.o tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o 
TARGET_LIB = libticpp.a

include $(PSPSDK)/lib/build.mak

install: all
    mkdir -p $(PSPDIR)/include $(PSPDIR)/lib
    cp ticpprc.h tinyxml.h tinystr.h ticpp.h $(PSPDIR)/include
    cp libticpp.a $(PSPDIR)/lib

Original issue reported on code.google.com by canalesg...@gmail.com on 24 Jun 2008 at 5:30

GoogleCodeExporter commented 9 years ago
Please ignore the extra information and use this one isntead.

This is the makefile I used to build TiCPP for the PSP.
Makefile -> http://pastebin.com/m5ba0c3fc

This is the makefile and source of the PSP example.
Makefile -> http://pastebin.com/m4fad737c
Source -> http://pastebin.com/m57745834

Original comment by canalesg...@gmail.com on 24 Jun 2008 at 5:44

GoogleCodeExporter commented 9 years ago
Apparently the PSP does not support run-time type information (RTTI).
Wikipedia: http://en.wikipedia.org/wiki/Run-time_type_information
Fortunately, ticpp only uses RTTI for some fluff features, which are not 
necessary. I
added a preprocessor flag, TICPP_NO_RTTI, to disable features that depend on 
run-time
type information.

I updated your makefile accordingly: 
http://pastebin.com/pastebin.php?diff=m42788081

Original comment by rjmy...@gmail.com on 24 Jun 2008 at 12:12

GoogleCodeExporter commented 9 years ago
Thanks rjmyst3, but the error is still out there to hunt me.
For some reason the TICPP_NO_RTTI flag appears to not be working.

Thanks  again for your help, highly appreciated.

Original comment by canalesg...@gmail.com on 24 Jun 2008 at 4:21

GoogleCodeExporter commented 9 years ago
you need to update your source
  svn update

Original comment by rjmy...@gmail.com on 24 Jun 2008 at 4:42