cyclonedds-python icon indicating copy to clipboard operation
cyclonedds-python copied to clipboard

how to Working with the IDL compiler?

Open yuedong111 opened this issue 2 years ago • 4 comments
trafficstars

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?

yuedong111 avatar Mar 31 '23 08:03 yuedong111

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.

thijsmie avatar Mar 31 '23 09:03 thijsmie

import cyclonedds

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

yuedong111 avatar Mar 31 '23 09:03 yuedong111

Add option "-x appendable" in your command.

dspeia avatar Nov 24 '23 02:11 dspeia