elliotchance/c2go

Need to include a directory for using c2go on a file

Crystal-Lilith opened this issue · 1 comments

Hello, i am wondering if i am able to include a full directory with c2go, as i am turning a big C project into a go project for testing, and to do so, i need to be able to include my Include folder, any help appreciated

Hi @Crystal-Lilith, off the top of my head you have three options:

  1. Perform each file at a time, to produce one go file for each C input file. Something like find . -name "*.c" | xargs -n1 | c2go transpile
  2. Supply multiple input files. Something like c2go transpile $(find . -name "*.c")
  3. Use the clang preprocessor first (see here)