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: Jerome BENOIT
Subject: Re: [Help-gsl] Problems with compiling Non Linear Fit Example
Date: Fri, 16 Feb 2018 13:09:05 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hi,

On 16/02/18 12:45, Dr. Jonny Birkhan wrote:
> Dear all,
> 
> I have installed gsl-2.4 on a
> 
> Linux 4.4.0-103-generic #126-Ubuntu SMP Mon Dec 4 16:23:28 UTC 2017 x86_64.
> 
> The libraries are installed in /usr/local/lib.
> 
> My gcc version is: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
> 
> 
> When I try to compile the Exponential Fitting Example I get the following 
> messages:
> 
> gcc -LLIBDIR=/usr/local/lib -o test test.c -lm -lgsl -lgslcblas
> 
> /tmp/ccuzgEIN.o:: In function `callback':
> test.c:(.text+0x2b1): undefined reference to `gsl_multifit_nlinear_residual'
> test.c:(.text+0x2c1): undefined reference to `gsl_multifit_nlinear_position'
> test.c:(.text+0x2d8): undefined reference to `gsl_multifit_nlinear_rcond'
> /tmp/cclIWgcr.o: In function `main':
> test.c:(.text+0x386): undefined reference to `gsl_multifit_nlinear_trust'
> test.c:(.text+0x399): undefined reference to 
> `gsl_multifit_nlinear_default_parameters'
> test.c:(.text+0x640): undefined reference to `gsl_multifit_nlinear_alloc'
> test.c:(.text+0x665): undefined reference to `gsl_multifit_nlinear_winit'
> test.c:(.text+0x671): undefined reference to `gsl_multifit_nlinear_residual'
> test.c:(.text+0x6f6): undefined reference to `gsl_multifit_nlinear_driver'
> test.c:(.text+0x708): undefined reference to `gsl_multifit_nlinear_jac'
> test.c:(.text+0x729): undefined reference to `gsl_multifit_nlinear_covar'
> test.c:(.text+0x755): undefined reference to `gsl_multifit_nlinear_trs_name'
> test.c:(.text+0x764): undefined reference to `gsl_multifit_nlinear_name'
> test.c:(.text+0x78f): undefined reference to `gsl_multifit_nlinear_niter'
> test.c:(.text+0xa9e): undefined reference to `gsl_multifit_nlinear_free'
> collect2: error: ld returned 1 exit status
> 
> I guess it's a problem with a missing library file. I couldn't find any bug 
> report on that problem.
> 
> The source code is appended.
> 
> Can you help me?

This looks like an installation issue:
1] why do you not play with the GSL Ubuntu package instead ?
2] if you want (but you do not want) to play with a /usr/local installation, 
make sue it does not interfer with the /usr installation:
in clear purge the libgsl-dev Ubuntu package and make sure the /usr/local/lib 
is taken into account ;
3] the _best_idea_, since GSL 2.4 has been packaged for Debian testing, install 
(or ask to your superuser to do so)
the GSL 2.4 Ubuntu package suite on your box;
4] try, $ gcc -I/usr/local/include -L/usr/local/lib -o test test.c -lgsl 
-lgslcblas -lm ## with relevant path .


> 
> Thanks in advance and best regards,

hth,
Jerome

> 
> Jonny Birkhan
> 



reply via email to

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