873 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...