Newbie query: mixing C and C++

I need to port some existing C++ code into a NET+OS/ThreadX/ConnectCore7U environment. I know that the GNU compiler can handle C++, so:

What chance do I have of importing C++ code, and mixing it with C code, and with the C code that comprises NET+OS, ThreadX, etc?

If this is possible, are there standard pitfalls I should look out for?

Is there anything documented about mixing C and C++ in a Digi-based environment?

mixing c/c++ is possible.
there is an example in the netos-package ( netos/src/examples/Cpptest). it is a good entry for this topic.
i use c/c++ with netos incl. threadx and bsp. i have made some classes witch encapsule the threads, queues, devices … there is one problem: e.g. tx_thread_create-function have a c-function as parameter but you can’t give every c+±methode as parameter, e.g. static methods works or extern-c-functions. you can use callback-function/methods and stubs as workaround.
another problem is the stl. it makes trouble and so i don’t use it currently, because i don’t know where is the problem.

I use it all the time. The extern “C” directive can be quite miraculus. In fact, I HAD to use C++ when I ported SSH to the ME since I had to dynamically create fake “processes” since NetOS doesn’t have a fork().

In other words, just make sure that your main thread has the extern “C”:

========================
extern “C”
void applicationStart (void)
{
}

And you can do everything else in C++. KUDOS: If you have callbacks, those have to be declared extern “C” as well.

-Erik