406 views
in Embedded Wizard Studio by
Hi,

Generated Code from Embedded Wizard is in C language.

But we want to include some CPP files from outside the embedded wizard environment.

Any roadmap to generate the code in CPP?

Or anyway to link our CPP files with the generated C code?

Best Regards,

Preethi S,

Robert Bosch - India

1 Answer

0 votes
by
Hello Preethi,

combining C and CPP files within a single application should not be a problem. We did it in the past often. The main problem raising with such combination: you can't inline native code containing C++ syntax. You need always a wrapper C function implemented within a separate C++ module serving as 'middleman' between the both worlds. This is true for the version 9.20 and below.

With the version 9.30 we add a new configuration parameter with it you can instruct the code generation to create the C files with an arbitrary file extension (e.g. *.cpp). The generated code is still C, but now the file can be compiled with C++ compiler and you can mix C and C++ code directly within a single module. Concret, you can call C++ methods from the native code. The borders between C and C++ disappear.

Does that shed some light on this topic?

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...