ImportC issue?
bachmeier
no at spam.net
Wed Apr 19 11:50:28 UTC 2023
On Wednesday, 19 April 2023 at 10:21:22 UTC, DLearner wrote:
> C source ex01.c:
> ```
> #include <stdio.h>
> int main()
> {
> printf("hello world\n");
> return 0;
> }
> ```
> 'dmc ex01.c' produces message:
> ```
> link ex01,,,user32+kernel32/noi;
> ```
>
> but does generate .obj, .map and .exe files,
> and the exe executes properly.
>
> However, trying to use ImportC via 'dmd ex01.c' produces
> messages:
> ```
> failed launching cl.exe /P /Zc:preprocessor /PD /nologo ex01.c
> /FIC:\D\dmd2\windows\bin64\..\..\src\druntime\import\importc.h
> /Fiex01.i
> Error: C preprocess command cl.exe failed for file ex01.c, exit
> status 1
> ```
>
> This behaviour was repeated after a complete fresh
> re-installation of dmd & dmc from the website.
Did you use the switch `-m32omf`?
https://dlang.org/spec/importc.html#auto-cpp
More information about the Digitalmars-d-learn
mailing list