Omnimaga
Calculator Community => TI Calculators => Calculator C => Topic started by: compu on March 27, 2011, 01:32:22 pm
-
I have tried to run C++ on the Nspire by replacing gcc with g++ in nspire-gcc, but the linker spams me with error messages then.
I got this to work once (with r349 I guess), so I was able to make a class with a function that prints something to RS232, but I was unable to use functions of libndls. I don't know how I exactly did this anymore (I reinstalled windows), so my question is, how can I get C++ to work again? If there is a chance to do this, wouldn't it be nice to include an nspire-g++ into ndless then?
-
I have tried to run C++ on the Nspire by replacing gcc with g++ in nspire-gcc, but the linker spams me with error messages then.
I got this to work once (with r349 I guess), so I was able to make a class with a function that prints something to RS232, but I was unable to use functions of libndls. I don't know how I exactly did this anymore (I reinstalled windows), so my question is, how can I get C++ to work again? If there is a chance to do this, wouldn't it be nice to include an nspire-g++ into ndless then?
First of all, I'm surprised you managed to get C++ on the NSpire on the first place.
Have no idea how to fix it now, though.
-
Perhaps some extern "C" { ... }; blocks would be in order ?
C++ on a Nspire is not really surprising, in fact :)
C++ code is not necessarily bloated (though the more advanced features can indeed yield significant bloat) and hard to compile for embedded platforms: in the absence of "virtual" stuff, things like inheritance and redefinition of some methods' implementation in derived classes, can be compiled to decent machine code. My team-mate (mostly) and I used such C++ code in the internship at the end of our studies, on a mildly embedded platform (several hundreds of KB of Flash memory).
-
Wow I didn't realize C++ was possible on it. Isn't C++ OOP btw? O.O
By the way shouldn't this be in the calculator help/C sub-forum?
-
Wow I didn't realize C++ was possible on it. Isn't C++ OOP btw? O.O
Yes, it is.
By the way shouldn't this be in the calculator help/C sub-forum?
Uhm, I don't know. Feel free to move it :P
-
Nobody has a solution?
-
Has C++ been ported to ARM9? If it has, it might be best just to use a dedicated toolchain.
EDIT: Well, obviously C++ has been at least partially ported...
-
Anyone tried using C++ again with newer versions of ndless? If it works, then I might use it.