This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Linking error problem related to #includes
- From: Kevin S D Beach <ksdb at MIT dot EDU>
- To: Gaurav Bansal <gaurav at godot dot urol dot uic dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: 29 Mar 2003 17:30:32 -0500
- Subject: Re: Linking error problem related to #includes
- References: <Pine.GSO.4.33.0303291609550.16200-100000@godot>
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