For me to get Devkitadvance working I had to link with
crtbegin.o
crtend.o
libstdc++.a
and don't use -nostdlib OR -nodefaultlibs otherwise you'll have to link
with libg.a and libgcc.a.
Cheers
Aaron
-----Original Message-----
From: Jerzy Kut [mailto:gephard-gbadev@...]
Sent: Sunday, 2 September 2001 3:32 p.m.
To: gbadev@yahoogroups.com
Subject: [gbadev] oop on gba :)
Hi everybody!
I would to user OOP on GBA. Is it possible ?
My test application (compiled under GCC - DevKit Advanced based on GCC3.0.1
if I don't mistake) need to alocate some memory using new [] operator and
free it using delete []. Linker throws errors:
C:\GBA\prj\dyna>gcc -o
dyna.elf -mcpu=arm7tdmi -I..\agblib\include -L..\agblib\l
ib main.cpp
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o: In function `Console::Console(unsigned
shor
t, unsigned short)':
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0x198): undefined reference to
`operat
or new[](unsigned long)'
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o: In function `Console::Console(unsigned
shor
t, unsigned short)':
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0x34c): undefined reference to
`operat
or new[](unsigned long)'
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o: In function `Console::~Console()':
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0x3b8): undefined reference to
`operat
or delete[](void*)'
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o: In function `Console::~Console()':
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0x410): undefined reference to
`operat
or delete[](void*)'
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o: In function `main':
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0xe0c): undefined reference to
`__cxa_
begin_catch'
/cygdrive/c/WINDOWS/TEMP/ccfWu9Mh.o(.text+0xe28): undefined reference to
`__gxx_
personality_sj0'
collect2: ld returned 1 exit status
I understand new and delete work on dynamically alocated memory. I don't
know this kind of memory is allowed on GBA.
I call my tet class Console - it is included by "main.cpp".
I am working on Win98.
What can I resolve this trouble ?
Best regards
Jerzy Kut
list rules: http://www.gbadev.org/rules.txt
unsubscribe: gbadev-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/