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?

Postby Guest » Fri Jun 19, 2015 12:48 pm

Guest

Postby Guest » Fri Jun 19, 2015 12:49 pm

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)

Who is online

Users browsing this forum: No registered users and 1 guest