no_skill
gp2x! bananas! mayhem! mayham!
hi,
i've spent a whole day porting SuperMarioWar to the gp32 using mrmirko's sdk.
i've replaced all pc dependant code, but now i've got a problem:
how can i enable new/delete and inheritance in mrmirko's sdk?
here's an example:
i've changed cpp.cpp from example.cpp to this:
thanks in advance, no_skill
i've spent a whole day porting SuperMarioWar to the gp32 using mrmirko's sdk.
i've replaced all pc dependant code, but now i've got a problem:
how can i enable new/delete and inheritance in mrmirko's sdk?
here's an example:
i've changed cpp.cpp from example.cpp to this:
Code:
// written 2004 Mirko Roller mirko@mirkoroller.de
// This is the c++ part
// modfied by no_skill to show the c++ problems
#include "gp32.h"
#include "cpp_prototypes.h"
#include "cpp.h"
using namespace std;
class basis {
public:
int wert;
basis() {}
basis(int wert) {this->wert=wert;}
virtual int get_private() { return wert;}
};
class plum : public basis{
public:
plum(int wert) {this->wert=wert;}
int get_private() { return wert * 30;}
};
int calling_cpp() {
basis *pluto = new plum(300);
int i = pluto->get_private();
delete pluto;
return i;
}
Code:
cpp.o(.text+0x10): In function `calling_cpp':
: undefined reference to `operator new(unsigned long)'
cpp.o(.text+0x34): In function `calling_cpp':
: undefined reference to `operator delete(void*)'
cpp.o(.gnu.linkonce.r._ZTI4plum+0x0): undefined reference to `vtable for
iv1::__si_class_type_info'
cpp.o(.gnu.linkonce.r._ZTI5basis+0x0): undefined reference to `vtable for
biv1::__class_type_info'
collect2: ld returned 1 exit status
thanks in advance, no_skill