[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: Compling Error gsu 2.6

From: Martin Jansche
Subject: Re: AW: Compling Error gsu 2.6
Date: Thu, 30 Jul 2020 20:15:48 +0100

I can't quite tell whether you've configured, compiled, and installed GSL.
General MO for error reports is that you provide details up front, which
helps everyone get to a speedier resolution without having to guess. You
say that you "have installed anything into the basic structures", but I
can't tell: did you run GSL's configure? Did you run make? Did you run make
install? What does "pkg-config --modversion gsl" print?

In general, try to compile with "gcc $(pkg-config --cflags) -c foo.c" and
link with "gcc -o foo foo.o $(pkg-config --libs gsl)". If you're using GNU
Make, then set CPPFLAGS and LDFLAGS appropriately there and rely on
its implicit rules. For any of this to work, you have to have pkg-config
working, which will be the case if you have GSL properly installed. If not,
you only have to debug pkg-config's access to GSL, and that will typically
reveal all other problems.

On Thu, Jul 30, 2020 at 5:38 PM John D Lamb <> wrote:

> Dear Benedikt:
> I also use Ubuntu (20.04) and have not had problems with GSL linking.
> The -L/usr/local/lib should be telling g++ to look in /usr/local/lib.
> But you seem to have installed gsl in ~/Programme; so it might be more
> sensible to use -L.. instead (I haven’t tested it).
> Ubuntu already has GSL in the repositories; so you might just install
> it. If you are using any recent version you should have stats available.
> And if GSL is installed in the Ubuntu default location, g++ will find
> etc without any extra effort.
> If you are using C++ and want to use GSL stats on, for example,
> std::vector<double>s, you could try
>, which will let you use gsl
> stats functions with objects C doesn’t know about. But solve the
> location problem first: ccgsl doesn’t
> need extra libraries but it does need somewhere to install header files.
> On 30/07/2020 15:53, Kalthoff, Benedikt Johannes wrote:
> > Dear all,
> >
> > I use an Ubuntu Linux system and have extracted the gsl files into
> > ~/Programme (thus ~/Programme/gsl/* are all the downloaded files)
> > and have installed anything into the basic structures.
> >
> > My blub.cpp lies in the ~/Programme/testprogramme and I looked
> > into the /usr/local/lib folder and have found the files you have
> mentioned.
> >
> > If I use now the command g++ -L/usr/local/lib -lgsl -lgslcblas -lm
> blub.cpp
> > I still get the old error.
> >
> > Might it be possible that I need another package which might be
> necessary?
> --
> John D Lamb

reply via email to

[Prev in Thread] Current Thread [Next in Thread]