logo

Linking against GSL on OS X 10.5 Leopard
Since I'm taking the Computational Physics module in my third year at IC, we're using some libraries like GSL to provide "better-than-default" random number generators and such like. It turns out that those of us using a Mac don't get GSL installed by default with Xcode, or under OS X - and unlike Windows and Linux - there's no instructions on the course site. Here's a really quick way to ensure that you can link against it:

  • Install MacPorts from MacPorts.org.
  • $ sudo /opt/local/bin/port install gsl
  • In the directory that you're writing your code from, perform the following:
    $ g++ -I/opt/local/include -L/opt/local/lib -lgsl -o binary_name source_file.cpp

Which should let you link against GSL just fine :-)

Tagged in: Code, ic.ac.uk, Tech
 
previous posts
contact details
gps logs
 
Fran Buckland [people]
hippy [people]
Andy Davidson [people]
Gem Atkinson [people]
rjs ssh key [tech]
rjs pgp key [tech]
londonfgss [cycling]
Rollapaluza [cycling]
CS Grupetto [cycling]
atom [rob.sh]
notebooks [rob.sh]
admin [rob.sh]
rss [rob.sh]
Stolen Bikes [london]
inhabitat [green]
core77 [design]