On 8/22/2017 8:14 AM, Jonathan Shamir wrote:
https://dlang.org/htod.html
I click download and get an exe!
And in the bugs section:
No linux version.
I'll start with the productive part. If anyone can point me out to the sources
of htod I would love to compile for linux + osx. Any task seems more attractive
to me than manually converting a 1000 line header to D.
You're right about htod, and it's on me. It's built out of the DMC++ front end.
I haven't gotten around yet to releasing it as open source.
The second problem is the DMC++ front end is tuned to deal with Windows compiler
extensions, not Linux compiler extensions. So compiling it and running it on
Linux will fail because every non-trivial C header file writer is unable to
resist using every extension.
There's also the gcc problem with its reliance on many hundreds (!) of
predefined macros that are turned on/off by various gcc compiler switches. It's
a madhouse. And, of course, every gcc on every platform has a different set of
these. The situation was so bad that when I developed Warp (a fast C
preprocessor) I left the predefined list up to the user to load from a special file.
gcc on Ubuntu has 240 predefined macros when using the default switches. Who
knows what the full list actually is.
gcc -dM -E - </dev/null
will print the list.
https://stackoverflow.com/questions/2224334/gcc-dump-preprocessor-defines