ImportC and #include files

bachmeier no at spam.net
Fri May 5 23:14:35 UTC 2023


On Friday, 5 May 2023 at 22:56:20 UTC, bachmeier wrote:

> The `import qnorm` line tells DMD to pull in the code from 
> qnorm.c in that same directory. I don't need to add qnorm.c in 
> the compilation command, which is
>
> ```
> dmd test.d -P-I. -P-I../gnuwin32/fixed/h -P-I../include 
> -L/usr/lib/libR.so
> ```

This statement is wrong. If it's included in the compilation 
command like this

```
dmd test.d qnorm.c -P-I. -P-I../gnuwin32/fixed/h -P-I../include 
-L/usr/lib/libR.so
```

the file qnorm.c is compiled and Rf_qnorm5 comes from there. If 
it's excluded

```
dmd test.d -P-I. -P-I../gnuwin32/fixed/h -P-I../include 
-L/usr/lib/libR.so
```

it's pulled from libR.so.


More information about the Digitalmars-d mailing list