Following this solution, I use #include "...frontend/tokens.mll"
in my lexer.mll
, then I use cpp -P frontend/lexer.mll -o frontend/gen/lexer.mll
to generate the complete mll file. This solution worked before under Ubuntu.
Now, I try to do this in Mac OS 10.11.1
, it gives an error clang: error: no input files
.
gcc -v
returns
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I don't see where I use XCode, or PCH file. Does anyone know how I should configure the environment to make cpp
work?
Edit 1:
cpp --version
returns
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
And an example from the comment: