Linking with static libgsl.a

Brian Gough bjg@network-theory.co.uk
Tue Dec 31 09:55:00 GMT 2002


banerjee@wernicke.ccn.upenn.edu writes:
 > g++ -static  -DDEBUG -g -Wall -O3 -o main main.cpp
 > -I/usr/local/include/gsl -I./include -I/home/banerjee/tar_code/libvoxbo
 > -L./ -L ./lib -L/usr/local/lib -lgslcblas -lgsl -lm -lvbutils
 >
 > I get errors of the type:
 > 
 > ./lib/libvbutils.a(vb_vector.o): In function
 > `VB_Vector::VB_Vector(gsl_vector const *)':
 > /home/banerjee/tar_mat/src/./vb_vector.cpp:99: undefined reference to
 > `gsl_vector_memcpy'

Hi,

Libraries are searched from left to right so the correct link order
would be -lvbutils -lgsl -lgslcblas -lm

regards 
Brian



More information about the Gsl-discuss mailing list