Problem with ImportC example?

DLearner bmqazwsx123 at gmail.com
Tue Jan 17 11:16:25 UTC 2023


This relates to the first example under 41.1 Quick Examples.

Stored as ex01.c, run as shown.


```
#include <stdio.h>
int main()
{
    printf("hello world\n");
    return 0;
}
```

Produced:

```

C:\Users\SoftDev\Documents\BDM\D\ImportC>dmd ex01.c
ex01.c(1): Error: C preprocessor directive `#include` is not 
supported
ex01.c(1): Error: no type for declarator before `#`
ex01.c(5): Error: no type for declarator before `return`
ex01.c(6): Error: no type for declarator before `}`
```



More information about the Digitalmars-d-learn mailing list