eclipse-cyclonedds / cyclonedds-python

Other
54 stars 44 forks source link

how to Working with the IDL compiler? #189

Open yuedong111 opened 1 year ago

yuedong111 commented 1 year ago

i use the idlc follow the doc (https://cyclonedds.io/docs/cyclonedds-python/0.10.2/idl.html) idlc -l py hello.idl and the content of the hello.idl as follows: module HelloWorldData { struct Msg { @key long userID; string message; }; };

then the errors occurs: idlc: cannot load generator py No default extensibility provided. For one or more of the aggregated types in the IDL the extensibility is not explicitly set. Currently the default extensibility for these types is 'final', but this may change to 'appendable' in a future release because that is the default in the DDS XTypes specification.

what is the generator py? how to install it?

thijsmie commented 1 year ago

Hi yuedong111,

If you have installed cyclonedds-python the generator py will be installed. If the command python3 -c "import cyclonedds" succeeds then the idl compiler for python will also work.

yuedong111 commented 1 year ago

import cyclonedds

the cyclonedds import is ok, i successfully installed the cyclonedds-python on windows10 , that error also happens.

dspeia commented 7 months ago

Add option "-x appendable" in your command.