Import C under Windows 10
drug007
drug2004 at bk.ru
Tue Apr 14 19:02:17 UTC 2026
On 4/14/26 17:25, DLearner wrote:
> This relates to:
>
> ```
> DMD64 D Compiler v2.112.0
> Copyright (C) 1999-2025 by The D Language Foundation, All Rights
> Reserved written by Walter Bright
>
> ```
>
> While trying to compile and run hello.c (ie trying out Import C):
>
> ```
> #include <stdio.h>
> int main()
> {
> printf("Hello world.\n");
> return 0;
> }
>
> ```
>
> I got
>
> ```
> Error: cl.exe not found. Please ensure that Visual Studio Build Tools
> are installed and properly configured.
> ```
> despite repeatedly downloading everything I could find relating to
> Visual Studio 2019.
>
> FWIW, isn't 'cl.exe' MS's _own_ C compiler - I wanted to use the C
> compiler within DMD.
>
> Ideas?
I don't use Windows so I can't help you but despite the fact that
cl.exe is MS's own C compiler, dmd uses C compiler just to call the
corresponding preprocessor. You can call it yourself and feed
preprocessed files to dmd directly. You don't need any C compiler but
you need a C preprocessor
More information about the Digitalmars-d-learn
mailing list