フィルターのクリア

Matlab clibgen generation enum question

2 ビュー (過去 30 日間)
kate_w
kate_w 2022 年 2 月 23 日
Hello,
I have a problem trying to integrate C++ code with MATLAB. I will show simple example to illustrate my problem.
I have a header file example.h with the following code:
typedef struct
{
enum
{
VALUE_1,
VALUE_2,
VALUE_3
} example_enum;
int example_val;
} Example;
I built my code and generated static .lib library. Now I am trying to compile and build this code in MATLAB with clibgen:
clibgen.generateLibraryDefinition('../src/example.h', "Libraries", '../LIB/libexample.lib', "PackageName", 'EXAMP')
definedlib = defineEXAMP()
build (definedlib)
When I call summary of defineEXAMP I see following:
>> summary(defineEXAMP)
MATLAB Interface to EXAMP Library
Class clib.EXAMP.Example
Constructors:
clib.EXAMP.Example()
clib.EXAMP.Example(clib.EXAMP.Example)
No Methods defined
Properties:
int32 example_val
In "Properites" filed I can only see int32 property, no enum. The same problem I have with union data type, I don't see it in MATLAB.
Is it possible to compile this code in MATLAB to see this enum as property of EXAMP?

回答 (0 件)

カテゴリ

Help Center および File ExchangeBuild MATLAB Interface to C++ Library についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by