gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > noob wants to code in c++

#11647 - kalvair - Wed Oct 15, 2003 2:55 am

Hi all,

I use gcc-based devkitadv-r5-beta-3 to code my first gba program.

I already have a lot of c++ code i'd like to reuse. here is my problem

I have lot's of link error when building my game:

- new/delete
- strlen and other standard c functions

This code compiles under a lot of differents compilers and platforms...

any ideas, or tutorials?

#11650 - tepples - Wed Oct 15, 2003 3:52 am

Without details, I would take an educated guess that using 'g++' instead of 'ld' or 'gcc' will help fix the problem. Next time please paste the errors.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11698 - Ninj4D4n - Thu Oct 16, 2003 2:58 am

tepples is right
gcc is the c compiler
g++ is the c++ compiler

the other issue is that devkitadv doesn't support the stdlib.

--Ninj4D4n

#11700 - tepples - Thu Oct 16, 2003 5:19 am

Ninj4D4n wrote:
tepples is right
gcc is the c compiler
g++ is the c++ compiler

Actually, they access the same compilers depending on source code file name extension. The difference is that the 'g++' executable adds a couple extra C++ support libraries to the linker's command line.

Quote:
the other issue is that devkitadv doesn't support the stdlib.

In my experience, DevKit Advance supports the stdlib quite well; it's just the stdio that's not implemented.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.