rtiddsgen -micro generate code Error

3 posts / 0 new
Last post
Offline
Last seen: 1 month 2 weeks ago
Joined: 10/10/2022
Posts: 2
rtiddsgen -micro generate code Error

Hi, 

i have a problem when i use rtiddsgen in rti_micro_dds,

when i try to use rtiddsgen to generate code , just like

rtiddsgen/scripts/rtiddsgen -micro -language C test.idl

the content in test.idl is a simple struct, like

struct HelloWorld {

    string<128> msg;

};

then came the problem:

INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 3.0.1, please wait ...
line 1:2 mismatched character '0' expecting set null
ERROR com.rti.ndds.nddsgen.antlr.auto.IdlParser line 1:4 no viable alternative at input '"/tmp/rtiddsgen20_6324280190222473004.cc"'
ERROR com.rti.ndds.nddsgen.Main Fail: java.lang.Exception: The file couldn't be parsed and the rawTree wasn't generated
INFO com.rti.ndds.nddsgen.Main Done (failures)

does anyone ever had a similar question?

Howard's picture
Offline
Last seen: 1 week 2 days ago
Joined: 11/29/2012
Posts: 439

Not sure, but could it be that your file has Windows line endings and you're running on Linux?  Try coverting the file to Linux line endings using "dos2unix".

Offline
Last seen: 1 month 2 weeks ago
Joined: 10/10/2022
Posts: 2

thanks for your reply

i solved it by adding --ppDisable parameter after rtiddsgen script,mybe it's due to my gcc version(12)