Using glibc headers with ImportC

qua quanrong1 at 1mailbox1.org1removethe1s
Sat Nov 12 15:08:22 UTC 2022


On Saturday, 12 November 2022 at 14:57:23 UTC, Adam D Ruppe wrote:
> I still don't think that's been released yet, so if you aren't 
> on the git master or at least the latest beta build it isn't 
> going to work. Which dmd version are you running?

I was running 2.098, I have just installed 2.100.2, which does 
say that use of #include is not supported.
I have tried too to preprocess hello.c with `gcc -E`, but dmd is 
also unable to compile it preprocessed (with errors such as

/usr/include/stdio.h(246): Error: found `__filename` when 
expecting `,`

).
Is there any reasonably simple way to compile files such as this 
hello.c, or is it not ready yet? I'm not an experienced 
programmer, so I mostly want to know if I'm doing something wrong 
or if there's an alternative that doesn't require manual 
translations from C to D.


More information about the Digitalmars-d-learn mailing list