Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
oop on gba :)   Message List  
Reply | Forward Message #6733 of 15019 |
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





Sun Sep 2, 2001 3:31 am

gephard-gbadev@...
Send Email Send Email

Forward
Message #6733 of 15019 |
Expand Messages Author Sort by Date

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...
Jerzy Kut
gephard-gbadev@...
Send Email
Sep 2, 2001
4:18 am

Use g++ to compile: g++ blah.cpp or add -lstdc++ to the command line gcc -lstdc++ blah.cpp...
Jason Wilkins
fenix@...
Send Email
Sep 2, 2001
8:04 am

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...
Aaron Koolen
blitzed@...
Send Email
Sep 3, 2001
6:29 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help