Register

Compiling C++ for sh3/sh4 with GCC

Discuss issues related to the fx-9860G Software Development Kit
Junior Member
Posts: 9
Joined: Wed Feb 14, 2018 2:18 pm
Calculators: Casio fx-9860GII SD Power Graphic 2

Compiling C++ for sh3/sh4 with GCC

Postby qferqo » Tue Feb 27, 2018 3:08 pm

I've found this easy-to-follow tutorial here: https://www.planet-casio.com/Fr/program ... .php?id=61, but this only covers compiling C code. After I had followed these steps, I was able to compile C code and some C++ code, but it seems like there's no support for the new operator. I implemented the new and delete operators myself, but there are still a lot of errors like 'undefined reference to `vtable for __cxxabiv1::__si_class_type_info''

Has anyone already managed to get a GCC C++ crosscompiler working for the sh3 (or rather sh4), and if so: could you tell me how you did it?

Member
User avatar
Posts: 39
Joined: Fri Aug 21, 2015 11:54 am
Location: France
Calculators: Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860GII, Casio fx-CG50

Re: Compiling C++ for sh3/sh4 with GCC

Postby lephe » Sun Mar 25, 2018 2:47 pm

Hope I'm not too late.

I've had a working C++ compiler at a time - and yours is probably fine ; the main problem is the lack of a standard library. There is an all-target-libstdc++-v3 target which you probably need to build and install before using the compiler. However, this will certainly not give you the full standard library, let alone the STL.

I haven't done in-depth research for C++ since I'm still working on interesting development environments in C, but I might be of some help. Don't hesitate to share build logs or code for more details.

Junior Member
Posts: 9
Joined: Wed Feb 14, 2018 2:18 pm
Calculators: Casio fx-9860GII SD Power Graphic 2

Re: Compiling C++ for sh3/sh4 with GCC

Postby qferqo » Wed Apr 04, 2018 5:31 pm

Thaaaank you, I'll definitely look into this some time. I don't need the full standard library, but things like the new operator and vectors would be really useful.

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 28 guests