Skip to main content
Dejan Nedeljkovic
Associate III
September 17, 2019
Solved

Call C++ functions from C

  • September 17, 2019
  • 2 replies
  • 4779 views

Hi

I would like to call C++ functions from C file.

For example I have a Callback to change the screen (void FrontendApplication::goToMainScreenCustom()) in FrontendApplication. I want to call this function from a C file.

Does anyone have an idea how to make this? Do I need a wrapper for such calls from a C file?

Regards

Dejan

This topic has been closed for replies.
Best answer by Dejan Nedeljkovic

Hi @Piranha​ 

Thanks for the links.

I've done it with a wrapper like it's described in https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp. It worked for me.

Regards

Dejan

2 replies

Dejan Nedeljkovic
Dejan NedeljkovicAuthorBest answer
Associate III
September 17, 2019

Hi @Piranha​ 

Thanks for the links.

I've done it with a wrapper like it's described in https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp. It worked for me.

Regards

Dejan