Matlab code to C++ classes in 2018 VS 2019

3 visualizaciones (últimos 30 días)
Bogdan Iliuta
Bogdan Iliuta el 11 de Oct. de 2019
Respondida: Denis Gurchenkov el 11 de Oct. de 2019
Hello,
I'm interested in converting some matlab code to C++ classes but if I inspect the documentation of 2018 and 2019 versions it seems that CppInterfaceStyle is missing from coder.CodeConfig. Can you please confirm that this is only available in 2019 codegen version? If so, the 2018 codegen will not generate any C++ classes?
Another question is about genereting code for Matlab containers.Map or use of jsondecode(). It seems that using the default codegen configs it's not possible to generate C/C++ code if you want to use any of those. I can understand that this may be mathworks proprietary code and it can't be added in plain text to the generated C/C++ files, but is there a library (.so or .dll) and some header files to which I could link in order to be able to use Map and json parser ?
Thank you

Respuesta aceptada

Denis Gurchenkov
Denis Gurchenkov el 11 de Oct. de 2019
Hi Bogdan,
The CppInterfaceStyle config parameter has been added in R2019b. In prior releases, it is not possible to generate C++ classes using MATLAB Coder.
For containers.Map and jsondecode, one workaround is to use coder.ceval and coder.opaque to integrate C/C++ code (generated from MATLAB) with some third-party C or C++ library that does these tasks.

Más respuestas (0)

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by