Anyone tried C++ yet. It seems to be available. I tried the following. iostream with no extension is available but the source file won't open it for some reason. On the last line of output window it says no C++ support available.
I was just curious to see how it compared to a C "hello C world"
But gave up.
#include <iostream> int main(void) { cout << "hello C++ world"\n"; return 0; }
I use the Realview C++ and think it is a great implementation (This came from ARM and is not Keil's). I converted a C project to C++ and the size did not grow at all and even allowed me to shrink a few items because the algorythm simplified. I converted many items to templates (task with stacks, message queues) I use constructors so that my RL-ARM semaphores, mailbox's and box's are initialized without having to call init functions and I use a few simple base classes with inheritance as well as virtual functions where nessacary. I have had no issues.
Hi Robert,
Thank you for the very interesting information. I have not spent any real time on the Keil C++ yet. I am intrigued to see that Keil have provided a C++ compiler and Rogue wave C++ library. But as you see I didn't get past "hello world" yet, and Keil don't seem to have provided any implentation details. Your post has certainly rekindled my interest. Perhaps this is work in progress at Keil - would love to know more!
Thanks.
I doesn't appear to be a work in progress. We are delivering full systems using the C++ compiler. I have not yet had the need to use iostream in any of our systems, so I really cannot comment on that part (even printf is WAY too large for us to use). This complier has clearly been around quite a while (as I said, it was the ARM (ARM as a company not as a processor) compiler that Keil is now using since ARM (the company) bought out Keil. I do not use the Rouge Wave libraries, so I cannot comment on that either. We actually converted a C project to C++ and the engineers where concerned that the code would "bloat" when we did that. I needed to be very careful in the conversion so that did not happen.
I tried to use the C++ as is. But got a whole bundle of error messages which wasn't very encouraging. Like your engineers I was also put off by reports of bloated code. I was primarily lead by curiosity. But I dont understand how you are using the C++ compiler, and how do you invoke it. You are using the compiler supplied in BIN30 right? I would appreciate a minimal program to kick me off, to get a taste of things.
This is the second post on C++, as you are the only person to respond, maybe you are also the only person actually using Keils C++ ?!
I've started a C++ Project for the STMicro ARM0 STR912. All files without (today) the STMicro Library are in C++. It works very vell.
View all questions in Keil forum