help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Problems with compiling Non Linear Fit Example


From: Mohammad Akhlaghi
Subject: Re: [Help-gsl] Problems with compiling Non Linear Fit Example
Date: Fri, 16 Feb 2018 17:33:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hi Jonny,

The problem seems to be that you are using `-LLIBDIR=/usr/local/lib'.

The values given to the `-L' option are directly read as a directory. So the linker will go looking into some directory called 'LIBDIR=/usr/local/lib' (which doesn't exist). But the linker doesn't complain about addresses not found, since it has many places to search that might not exist on different systems.

So the solution is to replace that part of your command with `-L/usr/local/lib'.

Also, since the math library is a low-level library, it might be better to link with it last. So my recommendation is to try this command over-all:

gcc -L/usr/local/lib -o test test.c -lgsl -lgslcblas -lm

I hope this fixes the problem,
Cheers,
Mohammad



reply via email to

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