2

I have been having troubles for some time now installing gsl on ubuntu. I followed this guide: http://www.brianomeara.info/tutorials/brownie/gsl with version 1.15. did ./configure, make install, etc. Now im trying to run an example:

http://www.mas.ncl.ac.uk/~ndjw1/teaching/sim/gsl.html

the compile command is gcc -I/usr/include/gsl -lgsl -lgslblasnative gsl_test.c -o gsl_test

and the error I get is: /usr/bin/ld: cannot find -lgslblasnative

I have also tried other examples before with the same error, that it cant find the libraries im trying to access. I am really a newbie to compiling/linking so I do not know what the parameters in these commands mean. And is there any way to check if the installation was successfully completed?

DJNZ
  • 121
  • 1
  • 13
Jonathan Lindgren
  • 1,192
  • 3
  • 14
  • 31
  • What's the output of `locate gslblasnative`? –  Jun 06 '13 at 12:42
  • No output. (executed the command in the gsl folder) – Jonathan Lindgren Jun 06 '13 at 12:46
  • You might try `-lgslblas` instead of `-lgslblasnative`. –  Jun 06 '13 at 12:49
  • I get the same error: /usr/bin/ld: cannot find -lgslblas – Jonathan Lindgren Jun 06 '13 at 12:57
  • One more. Try `-lgslcblas` (with a `c`) instead of `-lgslblasnative`. I think one of your problems is the instructions for the site you linked are for version 0.7 of `gsl` which may not be the same for the version you're using. –  Jun 06 '13 at 13:08
  • Not working, but a different error:/tmp/ccFsFomJ.o: In function `main': gsl_test.c:(.text+0x12): undefined reference to `gsl_rng_mt19937' gsl_test.c:(.text+0x1a): undefined reference to `gsl_rng_alloc' gsl_test.c:(.text+0x51): undefined reference to `gsl_ran_gaussian' gsl_test.c:(.text+0x72): undefined reference to `gsl_ran_gamma' – Jonathan Lindgren Jun 06 '13 at 13:13
  • To confirm you're using the command `gcc -I/usr/include/gsl -lgsl -lgslcblas gsl_test.c -o gsl_test`? –  Jun 06 '13 at 13:25
  • I believe that there might be a problem with my installation of gsl, but I do not know how to check that... – Jonathan Lindgren Jun 06 '13 at 13:47

0 Answers0