ImportC and #include files

bachmeier no at spam.net
Fri Apr 28 14:35:25 UTC 2023


On Friday, 28 April 2023 at 14:25:39 UTC, bachmeier wrote:
> On Thursday, 27 April 2023 at 20:16:32 UTC, Walter Bright wrote:
>
>> Try using ImportC on various popular C .h files on your 
>> platform. For the ones that fail to compile, please find the 
>> offending few lines of code and post them to bugzilla. (Just 
>> the error message and the name of the .h file is not enough, 
>> several of this sort have been posted to bugzilla, but sadly I 
>> can do nothing with them because I don't have those .h files.)
>
> Looks like you've made a lot of progress the last few months. I 
> was going to file some bug reports to help you out. I tested 
> DMD (latest commit on Github) with a couple of C programs that 
> were not close to compiling in late December. Unfortunately 
> there were no issues today. There was no difference when 
> compiling and running using dmd or gcc.

In case anyone is curious about the details, I compiled test 
programs in the GNU Scientific Library. One was for function 
minimization and the other random number generation.

Compiling with gcc:

```
gcc test.c -I../../gsl-2.7.1 -I/usr/include 
-L/usr/lib/x86_64-linux-gnu/ -lgsl -lgslcblas -lm
```

Compiling with dmd:

```
dmd test.c -P-I../../gsl-2.7.1 -I/usr/include 
-I/usr/lib/x86_64-linux-gnu/ -L-lgsl -L-lgslcblas -L-lm
```


More information about the Digitalmars-d mailing list