How to use ImportC?

dangbinghoo dangbinghoo at gmail.com
Mon Mar 7 01:12:40 UTC 2022


On Friday, 4 March 2022 at 01:30:00 UTC, Leonardo wrote:
> Thanks but not worked here.
>
> ```
> [leonardo at leonardo-pc dimportc]$ dmd --version
> DMD64 D Compiler v2.098.1
>
> Copyright (C) 1999-2021 by The D Language Foundation, All 
> Rights Reserved written by Walter Bright
> [leonardo at leonardo-pc dimportc]$ ls
...
> /usr/include/dlang/dmd/core/stdc/stdio.d(1485): Error: function 
> `core.stdc.stdio.vsnprintf` `pragma(printf)` functions must be 
> `extern(C) int vsnprintf([parameters...], const(char)*, 
> va_list)`
>
> ```

LDC works with DMD fronted the same version v2.098.1

LDC - the LLVM D compiler (1.28.1):
   based on DMD v2.098.1 and LLVM 13.0.1




More information about the Digitalmars-d-learn mailing list