eProsima / Fast-DDS-Gen

Fast-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
80 stars 59 forks source link

fastddsgen.bat .\HelloWorld.idl Error #281

Open wanghuqiang123 opened 9 months ago

wanghuqiang123 commented 9 months ago

OS:windows11+vs2019 I install fastdds using binary packages on Windows,I use HellowWorldExample, I tried to generate the idl file using fastddsgen myself, but when I ran fastddsgen.bat/Helloworld.idl, the following error occurred:

Processing the file .\HelloWorld.idl... ERROR: Cannot execute the preprocessor. Reason: Cannot run program "cl.exe": CreateProcess error=2, The system cannot find the specified file,

I am a beginner and I would like to know if it is necessary to use the fastddsgen tool and idl file before using fastdds

JesusPoderoso commented 8 months ago

Hi @wanghuqiang123 thanks for using Fast DDS. I would recommend you use the Visual Studio Developer Command Prompt to avoid this issue. You can also run fastddsgen with the flag -ppDisable to disable preprocessor, or with the flag -ppPath with the preprocessor path.