Guest User

Untitled

a guest
Feb 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. sudo apt-get install libgsl2 libgsl-dev gsl-bin
  2.  
  3. // include files
  4. #include <iostream>
  5. #include <iomanip>
  6. #include <fstream>
  7. #include <math.h>
  8. using namespace std;
  9.  
  10. #include <gsl/gsl_sf_bessel.h> // gsl Bessel special function header
  11. file
  12. //packages I need
  13. #include <gsl/gsl_sf_gamma.h>
  14. #include <gsl/gsl_sf_hermite.h>
  15.  
  16. int
  17. main (void)
  18. {
  19. double x = 5.0; // just a random test value
  20.  
  21. double y = gsl_sf_bessel_J0 (x); // see the GSL manual for details
  22.  
  23. cout << "J0(" << x << ") = "
  24. << setprecision(18) << setw(20) << y << endl;
  25.  
  26. y = gsl_sf_hermite_phys(10,x); // see the GSL manual for details
  27. cout << "H10(" << x << ") = "
  28. << setprecision(18) << setw(20) << y << endl;
  29.  
  30. return 0;
  31. }
  32.  
  33. gsl_test.cpp:(.text+0xcd): undefined reference to`gsl_sf_hermite_phys'
  34. collect2: error: ld returned 1 exit status
Add Comment
Please, Sign In to add comment