I have been using GSL with VC++.
I haven't been facing any problem with my configuration of VC++ until I tried to use the root finder.
When I try to compile the GSL exemple (using the Brent Root finder), I receive the error message :
libgsl.a(roots_brent.o) : error LNK2019: unresolved external symbol _finite referenced in function _brent_init
Does anybody have an idea of what I should do ?
Many thanks.
double a = p->a;
double b = p->b;
double c = p->c;
return (a * x + b) * x + c;
}
double
quadratic_deriv (double x, void *params)
{
struct quadratic_params *p = (struct quadratic_params *) params;
double a = p->a;
double b = p->b;
double c = p->c;
return 2.0 * a * x + b;
}
void
quadratic_fdf (double x, void *params,
double *y, double *dy)
{
struct quadratic_params *p = (struct quadratic_params *) params;
double a = p->a;
double b = p->b;
double c = p->c;
*y = (a * x + b) * x + c;
*dy = 2.0 * a * x + b;
}
The first program uses the function solver gsl_root_fsolver_brent for Brent's method and the general quadratic defined above to solve the following equation,
I created a VC++ 2005 Express project for this using a debug gsl dll built using the same compiler (converted from VC7). I had no unresolved references.
The function in question (finite) is part of the VC runtime library, not gsl. Could you perhaps be linking against a different CRT than the gsl library or dll? Did you generate the dll yourself using VC8?
If you're still having problems, please continue the dialog giving more details of the gsl library and VC configuration you're using.
Thanks,
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have been using GSL with VC++.
I haven't been facing any problem with my configuration of VC++ until I tried to use the root finder.
When I try to compile the GSL exemple (using the Brent Root finder), I receive the error message :
libgsl.a(roots_brent.o) : error LNK2019: unresolved external symbol _finite referenced in function _brent_init
Does anybody have an idea of what I should do ?
Many thanks.
Here is the exemple I am tring to compile :
struct quadratic_params
{
double a, b, c;
};
We place the function definitions in a separate file (demo_fn.c),
double
quadratic (double x, void params)
{
struct quadratic_params p
= (struct quadratic_params *) params;
The first program uses the function solver gsl_root_fsolver_brent for Brent's method and the general quadratic defined above to solve the following equation,
with solution x = \sqrt 5 = 2.236068...
include <stdio.h>
I created a VC++ 2005 Express project for this using a debug gsl dll built using the same compiler (converted from VC7). I had no unresolved references.
The function in question (finite) is part of the VC runtime library, not gsl. Could you perhaps be linking against a different CRT than the gsl library or dll? Did you generate the dll yourself using VC8?
If you're still having problems, please continue the dialog giving more details of the gsl library and VC configuration you're using.
Thanks,
Jerry