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

On Windows, using a GCC preprocessor does not work #331

Open fschoenm opened 5 months ago

fschoenm commented 5 months ago

When trying to run fastddsgen on Windows with a GCC preprocessor, it fails with the following error:

$ fastddsgen Header.idl -replace -ppPath aarch64-none-linux-gnu-cpp"
Processing the file Header.idl...
aarch64-none-linux-gnu-cpp: fatal error: too many input files
compilation terminated.
ERROR<callPreprocessor>: Preprocessor return an error 1

The problem seems to be that fastddsgen assumes that on Windows, cl.exe is the only valid compiler/preprocessor to use. The GCC preprocessor can only be used on Linux and macOS.

Could you somehow fix this problem (e.g. depending on the name of the -ppPath argument) or add a work-around via another CLI argument to specify the type of preprocessor?