This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking error problem related to #includes


On Sat, 2003-03-29 at 17:13, Gaurav Bansal wrote:
> Hello
> 
> I have a program that uses gnu-gsl eigen value library.

> $ make
> g++ -Igsl -o deletethis.o -c deletethis.cpp
> g++ -Igsl -o matrix.o -c matrix.cpp
> g++ -Igsl -o vector_ops.o -c vector_ops.cpp
> g++ -Igsl -o utility.o -c utility.cpp
> g++ -Igsl -o qrstep.o -c qrstep.c
> g++ -Igsl -o symm.o -c symm.c
> g++ -Igsl deletethis.o matrix.o vector_ops.o utility.o symm.o qrstep.o

You need to tell the linker which gsl libraries you're using and to
specify the directory using the -L flag.  For example, on my machine I
might compile with something like

g++ -I/mit/gnusl/include test.cc -L/mit/gnusl/lib -lgsl -lgslcblas -lm

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]