string member in c++ interface

3 views (last 30 days)
Jonas Steiner
Jonas Steiner on 22 Oct 2021
Edited: Jonas Steiner on 22 Oct 2021
I want to use the matlab c++ interface using clibgen.generateLibraryDefinition(...) etc. bacuse i am using an api dll from an external source (i can not cahnge the source code).
In there is a struct with a string member name (concisely a wchar_t array : "wchar_t name[120]") with constant length 120 (240 Bytes).
The resulting interface does list the class but without the string member name.
I tried manually adding a member of type "string" to the class definition in the .m and the .mlx with the resulting console output:
"The property 'name' that is being added does not exist in the class."
The other problem is the fixed length in memory. It needs to be 240 Bytes and stay 240 Bytes at all times.

Answers (0)




Community Treasure Hunt

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

Start Hunting!