This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Linking with static libgsl.a
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