Matlab code to C++ classes in 2018 VS 2019

2 次查看(过去 30 天)
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

采纳的回答

Denis Gurchenkov
Denis Gurchenkov 2019-10-11
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Generating Code 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by