Hi armink,
Are you sure that the function ptr prototype is exactly the same?
I see this:
extern NAG_DLL_EXPIMP void NAG_CALL d01ajc(NAG_D01AJC_FUN f , double a, double b,
double epsabs, double epsrel, Integer max_num_subint,
double *result, double *abserr, Nag_QuadProgress *qp,
NagError *fail);
where
typedef double (NAG_CALL * NAG_D01_FUN)(double);
typedef NAG_D01_FUN NAG_D01AJC_FUN;
So, your function should be declared like this:
double NAG_CALL f(double x)
{
...
}
NAG_CALL denotes proper calling convention.
ML