I'm using Ver. 4.9.9.2 of Dev C++ on a Windows 7 platform. I recently downloaded the gsl library (GNU Scientific Library) and wanted to test it using a simple program as follows:
include <stdio.h>
include <gsl gsl_sf_bessel.h="">
int
main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_J0(x);
printf ("J0(%g) = %.18e\n", x, y);
return 0;
}
However, when I tried to compile it, I got the following error message:
[Linker error] undefined reference to 'gsl_sf_bessel_J0'
All the gsl files seemed have been installed properly using the WebUpdate module in the About Dev-C++ dialog box, but apparently the compiler must have trouble trying to read the .h file for some reason.
I can compile other simple programs, such as the tutorial examples from programming manuals, so I'm pretty sure the software was installed correctly.
Any help would be appreciated,
Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I eventually figured it out that I need to include the two files libgsl.a and libgslcblas.a using the "Add Library or Object" option under the Parameters section of the Project Options dialog box. Hopefully, this information might prove useful for others looking to incorporate the GSL header files in their own programs using Dev-Cpp.
Thanks,
Bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Cpp users,
I'm using Ver. 4.9.9.2 of Dev C++ on a Windows 7 platform. I recently downloaded the gsl library (GNU Scientific Library) and wanted to test it using a simple program as follows:
include <stdio.h>
include <gsl gsl_sf_bessel.h="">
int
main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_J0(x);
printf ("J0(%g) = %.18e\n", x, y);
return 0;
}
However, when I tried to compile it, I got the following error message:
[Linker error] undefined reference to 'gsl_sf_bessel_J0'
All the gsl files seemed have been installed properly using the WebUpdate module in the About Dev-C++ dialog box, but apparently the compiler must have trouble trying to read the .h file for some reason.
I can compile other simple programs, such as the tutorial examples from programming manuals, so I'm pretty sure the software was installed correctly.
Any help would be appreciated,
Bob
I eventually figured it out that I need to include the two files libgsl.a and libgslcblas.a using the "Add Library or Object" option under the Parameters section of the Project Options dialog box. Hopefully, this information might prove useful for others looking to incorporate the GSL header files in their own programs using Dev-Cpp.
Thanks,
Bob
Buy Ozempic online UK is A Trusted Source To Buy Ozempic online. Buy Ozempic online. We have safe and 100% genuine Ozempic in our stock.
Last edit: ayaz 2023-10-19