help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Undefined reference to gsl_deriv_forward


From: Vale Cofer-Shabica
Subject: Re: [Help-gsl] Undefined reference to gsl_deriv_forward
Date: Tue, 24 May 2016 13:03:30 -0400

Simon,

I suspect that Cloud9 doesn't know which include/link flags to use. See
this section [1] of the reference manual for details, but you can try:

% gcc -Wall -I/usr/include -c example.c
% gcc -L/usr/lib example.o -lgsl -lgslcblas -lm

Which will compile your code in example.c to an executable called a.out.
Note, I used the installation prefix /usr, which you indicated in a
previous message.

Hope that helps,
vale

[1]
https://www.gnu.org/software/gsl/manual/gsl-ref.html#Compiling-and-Linking

--
vale cofer-shabica
401.267.8253

On Tue, May 24, 2016 at 12:39 PM, Simon Bart <address@hidden>
wrote:

> Cloud9 has a built-in tab for compiling and running code which I use for
> convenience, but I've also been trying with g++ without success
> On May 24, 2016 12:36 PM, "Vale Cofer-Shabica" <
> address@hidden> wrote:
>
>> Hi Simon,
>> While that should fine, you could also use Ubuntu's GSL package,
>> libgsl-dev.  How are you compiling and executing your program? And when
>> does the error appear?
>>
>> -vale
>>
>> --
>> vale cofer-shabica
>> 401.267.8253
>>
>> On Tue, May 24, 2016 at 12:12 PM, Simon Bart <address@hidden>
>> wrote:
>>
>>> I'm using Cloud9 which is fully implemented Ubuntu except cloud hosted
>>> and I installed GSL in my /usr/include library using the ./configure, make
>>> and make install commands
>>> On May 24, 2016 11:47 AM, "Vale Cofer-Shabica" <
>>> address@hidden> wrote:
>>>
>>>> Hi Simon,
>>>>
>>>> Could you give us some more info about you set-up (OS & how you
>>>> installed GSL) and how you're compiling your program? I suspect that you
>>>> may be missing a flag to link the GSL libraries, -lgsl.
>>>>
>>>> -vale
>>>>
>>>> --
>>>> vale cofer-shabica
>>>> 401.267.8253
>>>>
>>>> On Tue, May 24, 2016 at 8:33 AM, Simon Bart <address@hidden>
>>>> wrote:
>>>>
>>>>> I've posted my issue in the subject box. I'm new to GSL. It was the
>>>>> best
>>>>> library I could find with the most math and science operations. I am
>>>>> using
>>>>> C++, but I've even tried with C and the same error occurs. Hope there's
>>>>> some help here.
>>>>>
>>>>> Cheers,
>>>>> Simon
>>>>>
>>>>
>>>>
>>


reply via email to

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