help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Gsl-1.8 compiled and running under MSYS-1.10+second order


From: Brian Gough
Subject: Re: [Help-gsl] Gsl-1.8 compiled and running under MSYS-1.10+second order derivative
Date: Mon, 30 Oct 2006 15:12:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060815 SeaMonkey/1.0.4

Rene Girard wrote:

double g1(double, double *);

I would like to bring to your attention that when I
compile that simple example and
I set the pointer to the function from we want to have
the derivative with the following
statement:
f.function = &g1; (like in the example in Chap. 27)

I get the following warning:

"warning: assignment from incompatible pointer type"

to remove the warning I had to cast the pointer as
follow:

 f.function = (double (*) ()) &g1;

Hello,
Thanks for your email. I think your warning can be avoided without a cast by using the prototype double g1(double, void *) which matches the definition in GSL. Otherwise, the appropriate cast would be (double (*)(double, void *)). See the header file gsl_math.h for the definition of the gsl_function type.

--
best regards,

Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]