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.

Coding > C++ going bad

#18487 - kanelo - Sat Mar 27, 2004 5:40 pm

I'm using Visual Ham as IDE to develop for GBA. I dont use HAM, and now I'm trying to write some of code in c++ but the compiler doesnt recognize my classes. Do I need to do something with the makefile or what ?

Thank you

#18491 - johnny_north - Sat Mar 27, 2004 6:20 pm

Quote:
Do I need to do something with the makefile or what ?


Probably.

LDFLAGS = -L $(LIBDIR) -L $(LIBDIR2) -L $(PRJLIB) -T lnkscript -lm -lg -lstdc++ -lgcc -nostartfiles -Wl,-Map,bin.map

OFILES = crt0.o start\crtbegin.o start\crtend.o main.o

Get Jeff Frowein's crt0/lnkscript package
Open the crt0.s file before compiling it and select C++ support along with any inturrupt support.
If I remember, you'll also need to explicitly include the crtbegin.o and crtend.o