ImportC rocks!

Ki Rill rill.ki at yahoo.com
Sat Mar 12 10:09:41 UTC 2022


On Saturday, 12 March 2022 at 09:59:45 UTC, IGotD- wrote:
> On Saturday, 12 March 2022 at 09:55:03 UTC, Ki Rill wrote:
>>
>> Compiling:
>> ```
>> gcc -E raylib.c > raylib.i
>> dmd main.d raylib.c -L=-lraylib
>> ./main
>> ```
>>
>
> You run the preprocessor in gcc then call the output raylib.i 
> but where is that file later used?

That was a typo. Should've been:
```
gcc -E raylib.c > raylib.i
dmd main.d raylib.i -L=-lraylib
./main
```

D does not have a C preprocessor. So we need to preprocess the C 
file ourselves before D can compile it.


More information about the Digitalmars-d mailing list