htod (8.52.5n) not recognizing wchar_t?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Tue Sep 26 08:17:19 UTC 2017


On Tuesday, September 26, 2017 07:33:57 DanielG via Digitalmars-d-learn 
wrote:
> According to this page (https://dlang.org/htod.html), wchar_t
> should be recognized as wchar. But I'm just getting an error:
> "Error: ')' expected" ... anywhere a wchar_t appears in my .h
> file.
>
> Anything I need to do? I'd prefer to keep this entire file
> uncommented so I don't always have to hand-edit the results of
> htod.

I find it quite surprising that it doesn't like wchar_t, but depending on
what version of C it's converting to, maybe wchar_t isn't officially part of
it. I don't know. I would have expected it to work.

However, regardless of this specific issue, htod hasn't been updated in
quite a while, and if you really want to be automatically generating C
bindings, I'd suggest that you look at dstep, which uses clang:

http://code.dlang.org/packages/dstep
https://github.com/jacob-carlborg/dstep

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list