Linking error problem related to #includes
Kevin S D Beach
ksdb@MIT.EDU
Sat Mar 29 22:30:00 GMT 2003
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
More information about the Gsl-discuss
mailing list