I am using a function written by someone else, that I am trying to use myself. It doesnt run successfully with the GCC compiler, but I think the issues are solveable - with a little help:
The author keeps declaring double variables like this:
Code:
static dbl (*objective)();
static dbl **simp, *fvalue;
static dbl *xcentroid;
static dbl fmean, fvar;
static dbl *xreflect, *xcontract, *xexpand;
static dbl freflect, fcontract, fexpand;
static dbl al = 1, bt = 0.5, gm = 2;
If i change the dbl to double it fixes the error. Was this an old way of declaring a double?
The next time there is a problem is here:
Code:
static void initialize()
{
int i;
simp = alloc(dbl *, nvar+1);
for (i=0; i<=nvar; i++) {
simp[i] = alloc(dbl, nvar);
}
fvalue = alloc(dbl, nvar+1);
xcentroid = alloc(dbl, nvar);
xreflect = alloc(dbl, nvar);
xcontract = alloc(dbl, nvar);
xexpand = alloc(dbl, nvar);
}
if i change these dbl to double I get a new error (on each of the lines above with dbl) that says: expression expected before double, and gives me a warning, assingment makes pointer from integer without a cast.
Please can someone help me get this function running.
Thanks