C++ library problem with OrangutanLCD

First time on an Orangutan SV328.
Everything has been downloaded and seems to be working.
The hardware has been tested with example code in c.
Everything I’ve read says this should compile, but Atmel Studio 6.1 throws an unknown type error for OrangutanLCD
I’ve tried calling with OrangutanLCD::print(“Hello”); but it still wont recognize OrangutanLCD as a valid.

#include <pololu/orangutan>
OrangutanLCD lcd;
int main()

any hints appreciated.


What is the name of your source file? If it ends in “.c” then Atmel Studio is most likely treating it as a C program and not C++, so the header file you included would not try to define any C++ classes.

Usually we recommend that people use C because most of our example Orangutan code is written in C. If you want to use C++ instead, you should follow the instructions in this post:


My problem is I started with Fortran, back in the day, and went right to C++. I can read and write C++, but there are intricacies to C that I would have to learn to read it fluently, for instance why all the fuss about printf? Rewriting your sample code in C++ sounds like a great way to learn about your controller, but the goal is to learn to write to the chip. What is Atmel doing. Their implementation of C++ seems to be limited. Are they C centered and likely to remain so? If yes, then it might be better to get cozy with C.
Thats’ in interesting question, though this is probably the wrong forum. Where do you see the chip makers of the world going. C bound forever, is oop irelevant on a microC or Arm? Some higher level language?

The AVR GCC compiler itself has supported C++ for a long time. The Arduino people base their IDE on compiling C++ code for AVRs and that has become very popular. The mbed (an ARM development board) uses both C and C++ internally, but the user programs are supposed to be written in C++ and interact with C++ libraries.

However, it does seem like C++ is not a high priority for Atmel. When Atmel released AVR Studio 5 (which became Atmel Studio) it didn’t officially support C++ for a while, but now it does. The Atmel Software Framework is probably all in C. I would guess that Atmel is more C-centered and that their biggest customers are also C-centered. I would guess that the reason for that is that C is a simpler language so it is easier to tell exactly what is going on, which is important for advanced users writing and checking complex applications.


thanks for the insight, though your C bias is showing. :slight_smile: If Atmel sticks to C it’s because it will because of the cost of existing code bases. If they continue to develop the C++ Implementation(or any thing else) it will be because there’s money in it.
Atmel Studio didn’t make it easy, but I finally have simple C++ code compiling using your libraries. If I can figure out how to save the configuration to a template, I might not shoot myself.

Once again, my thanks to Pololu. For a few bucks I bought parts that allowed me to build simple bot in an afternoon and now I have a platform to write code to.