#!/bin/bash # The following might have to be changed cd /opt/gsl-1.99.90/doc/examples # # Verbose record of compiler in interp2d.lst gcc -v -g -Wall -o interp2d interp2d.c -lgsl -lgslcblas -lm &>interp2d.lst # # You will notice that everything looks okay, to me, in interp2d_locate.lst locate interp2d.a &> interp2d_locate.lst # Manually examing my interp2d_locate.lst and checking ls -ldt /usr/lib/libgsl.a # Response -rw-r--r-- 1 root root 4668446 Dec 12 2013 /usr/lib/libgsl.a ls -ldt /usr/local/lib/libgsl.a # Response -rw-r--r-- 1 root root 17889314 Oct 31 17:44 /usr/local/lib/libgsl.a # and gcc -g -Wall -o interp2d interp2d.c /usr/local/lib/libgsl.a -lgslcblas -lm # works. # ldconfig check : it doesn't work against xx.a files though ldconfig -p |egrep libgsl