ImportC and #include files
some_d_user
some at thing.com
Fri Apr 28 15:11:10 UTC 2023
On Friday, 28 April 2023 at 14:35:25 UTC, bachmeier wrote:
> 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
> ```
Appearently I'm not the only one interested in mathematical
optimization ;)
I tried to build one of the examples of
https://github.com/scipopt/scip (linking against a gcc compiled
binary) and dmd screwed up on "assert(scip != NULL);". I tracked
that down to https://issues.dlang.org/show_bug.cgi?id=23864
which seems to be caused by my system headers.
More information about the Digitalmars-d
mailing list