[Top][All Lists]
[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: |
Rene Girard |
Subject: |
Re: [Help-gsl] Gsl-1.8 compiled and running under MSYS-1.10+second order derivative |
Date: |
Wed, 22 Nov 2006 20:29:38 -0500 (EST) |
Brian
Thanks I have tried your suggestion and it works fine.
Rene Girard
Brian Gough <address@hidden> wrote: Rene Girard wrote:
> gcc -O2 -Wall -ansi -I/usr/local/include -c -o t_dn2.o t_dn2.c
> t_dn2.c: In function g_x:
> t_dn2.c:61: warning: dereferencing void * pointer
> t_dn2.c:61: error: void value not ignored as it ought to be
>
> double g_x(double x, void *params)
> {
> const double pi = 4.0*atan(1.0);
> double yo,y1;
>
> yo = (sin(pi*x/2.0)*sin(pi*params[1]/2));
> y1 = yo*yo;
With the prototype for g_x() above params[1] is an invalid expression,
because params has void* type. Use something like double *p = params;
then access elements as p[0], p[1] etc.
--
best regards,
Brian Gough
Network Theory Ltd,
Publishing "An Introduction to GCC"
http://www.network-theory.co.uk/gcc/
---------------------------------
All new Yahoo! Mail
---------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.