| Thread overview | ||||||||
|---|---|---|---|---|---|---|---|---|
|
November 30, 2014 Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Hi! D noob here. I'm trying to call this function from the GSL lib: double gsl_stats_long_double_mean (const long double [], const size_t, const size_t); linking with: -L-lgsl -L-lgslcblas -L-lm I have tried different configurations, refering to http://dlang.org/interfaceToC.html and the forums, but it always gives me probems like, calling it the wrong way or segmentation falt. Can anyone help? Arjan | ||||
November 30, 2014 Re: Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Arjan | On Sunday, 30 November 2014 at 12:21:51 UTC, Arjan wrote: > Hi! > D noob here. > I'm trying to call this function from the GSL lib: > > double gsl_stats_long_double_mean (const long double [], const size_t, const size_t); > > linking with: -L-lgsl -L-lgslcblas -L-lm > > I have tried different configurations, refering to > http://dlang.org/interfaceToC.html and the forums, but it always gives me probems like, > calling it the wrong way or segmentation falt. > Can anyone help? > > Arjan the correct signature in D for that would be: import core.std.config; double gsl_stats_long_double_mean(const(c_long_double)*, const size_t, const size_t); | |||
November 30, 2014 Re: Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On Sunday, 30 November 2014 at 13:09:15 UTC, John Colvin wrote:
> On Sunday, 30 November 2014 at 12:21:51 UTC, Arjan wrote:
>> Hi!
>> D noob here.
>> I'm trying to call this function from the GSL lib:
>>
>> double gsl_stats_long_double_mean (const long double [], const size_t, const size_t);
>>
>> linking with: -L-lgsl -L-lgslcblas -L-lm
>>
>> I have tried different configurations, refering to
>> http://dlang.org/interfaceToC.html and the forums, but it always gives me probems like,
>> calling it the wrong way or segmentation falt.
>> Can anyone help?
>>
>> Arjan
>
> the correct signature in D for that would be:
>
> import core.std.config;
>
> double gsl_stats_long_double_mean(const(c_long_double)*, const size_t, const size_t);
I admit i was far from getting it right :), and was unaware of core.std.config functionalities.
Thanks!
Arjan.
| |||
November 30, 2014 Re: Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Arjan | On 30/11/14 13:21, Arjan via Digitalmars-d-learn wrote:
> Hi!
> D noob here.
> I'm trying to call this function from the GSL lib:
Out of curiosity (since your question has already been answered), what functionality is it that is making you want to use GSL? I ask because I want to be sure we're not missing something we ought to have in Phobos.
| |||
December 01, 2014 Re: Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | On Sunday, 30 November 2014 at 16:26:53 UTC, Joseph Rushton Wakeling via Digitalmars-d-learn wrote:
> On 30/11/14 13:21, Arjan via Digitalmars-d-learn wrote:
>> Hi!
>> D noob here.
>> I'm trying to call this function from the GSL lib:
>
> Out of curiosity (since your question has already been answered), what functionality is it that is making you want to use GSL? I ask because I want to be sure we're not missing something we ought to have in Phobos.
I'm taking a course in "statistical inference and uncertainty", since I'm learning D, i thought I'd do some numerical computing in it.
Does there exist a library so I can stick in D only?
| |||
December 01, 2014 Re: Problem interfacing with GSL | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Arjan | On Monday, 1 December 2014 at 12:17:46 UTC, Arjan wrote: > On Sunday, 30 November 2014 at 16:26:53 UTC, Joseph Rushton Wakeling via Digitalmars-d-learn wrote: >> On 30/11/14 13:21, Arjan via Digitalmars-d-learn wrote: >>> Hi! >>> D noob here. >>> I'm trying to call this function from the GSL lib: >> >> Out of curiosity (since your question has already been answered), what functionality is it that is making you want to use GSL? I ask because I want to be sure we're not missing something we ought to have in Phobos. > > I'm taking a course in "statistical inference and uncertainty", since I'm learning D, i thought I'd do some numerical computing in it. > Does there exist a library so I can stick in D only? http://code.dlang.org/packages/dstats | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply