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

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

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 #6738 of 15019 |
RE: [gbadev] oop on gba :)

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/






Mon Sep 3, 2001 6:29 am

blitzed@...
Send Email Send Email

Forward
Message #6738 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