星期四, 六月 24, 2010

Install GSL on my iMac

This can actually be installed directly from GSL source codes. However, I want to use other GNU software easily, so I:
  1. download fink from http://downloads.sourceforge.net/fink/fink-0.29.10.tar.gz as there is no binary codes for Mac os 10.6.
  2. $ tar zxvf fink-0.29.10.tar
  3. $ cd fink-0.29.10
  4. $ ./bootstrap  # Note: I chose 64-bit version to run GSL
  5. $ /sw/bin/pathsetup.sh
  6. $ fink selfupdate
    next install GSL source codes as no binary for mac+fink
  7. $ fink install gsl
    usually one should  run command as below
  8. $ g++ -I/sw/include -L/sw/lib -lgsl some.cpp
    there are many ways to circumvent above -I & -Ls, e.g.
  9. $ echo alias gsl=\’g++ -I/sw/include -L/sw/lib -lgsl\’ >>~/.bashrc
  10. restart terminal, now we can compile GSL codes as below
  11. $ gsl sample.cpp

没有评论: