How to call C++ functions from XC?

If you have a simple question and just want an answer.
Guest

How to call C++ functions from XC?

Post by Guest »

Guest

Post by Guest »

Calling C++ from xC is much the same as calling C++ from C. You'll need to write wrapper functions that are implemented in C++ that have C linkage (i.e. are tagged with extern "C"). For more details see:

https://isocpp.org/wiki/faq/mixing-c-and-cpp

There's an simple example which calls between C++ and xC on github.

https://github.com/rlsosborne/app_calling_cxx_from_xc

You might also want to take a look at the following post:

https://www.xcore.com/forum/viewtopic.php?f=26&t=3017
 
Added for the benifit of other users (Original Forum Topic : http://www.xcore.com/forum/viewtopic.php?f=26&t=3337)