changing the basic sample to use C++

I’m using the Basic Sample as a starting point for my own application. I have imported the files CSocket.h and .cxx from the C++ sample into my C project.

Now I need to change the project into a C++ project.

I have already changed this in appconfig.h:
#define APP_CPP TRUE

But this is not enough. The C compiler is still used and not the C++ compiler (I get an error saying the compiler doesn’t understand the class keyword).

How can I use the C++ compiler? (I’m using the Digi ESP for NET+OS, the Eclipse thingy).

My fault: I included a C++ header file from within a normal C file. Problem solved by changing the file extension to .cxx.

Don’t forget the extern “C”.


extern “C”
void applicationStart (void)