Tuesday, December 23, 2014

Installing GSL on Linux

Setting up GSL
1. Downloading gsl library
wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.7.tar.gz

2. Unpack file, this create a new directory called gsl-1.7 in your home directory
tar -zxvf gsl-1.7.tar.gz

3. Create a new directory
mkdir /home/justin/dev

4. Configure the installation and tell it to use your new directory
./configure --prefix=/home/justin/dev

5. Actual installation
make
make check
make install

Linking libraries
1) C
gcc -Wall -I/home/justin/dev/include -c example.c
gcc -L/home/justin/dev/lib example.o -lgsl -lgslcblas -lm

2) Similarly, C++
g++ -Wall -I/home/justin/dev/include -c example.cpp
g++ -L/home/justin/dev/lib example.o -lgsl -lgslcblas -lm

Then proceed to run program with
./a.out

Installing Sublime Text 2 on Linux

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text

sudo: super user do
ppa:webupd8team/sublime-text-2: adding unsupported packages with this PPA (Personal Package Archive)
apt-get: get a package from the Advance Packing Tool
update: to synchronize the package index file from the source