[Gambas-user] cannot find symbol sinh in libc

PICCORO McKAY Lenz mckaygerhard at gmail.com
Mon Jun 11 22:44:43 CEST 2018


2018-06-11 16:39 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:

> What I'm missing here? Sinh is also already native Gambas function.
> I bet using it as external function makes it only little bit slower for
> zero gain.
>

umm ok but if are using as external, any changes over the libc will be
reflected at gambas side without updating.. maybe the only benefit from..


>
>
> Jussi
>
> On Mon, Jun 11, 2018 at 11:04 AM, Demosthenes Koptsis <
> demosthenesk at gmail.com> wrote:
>
>> Thanks Tobias!
>>
>> Anyway sinh is documented in glibc manual also, but it is not there as
>> you say.
>>
>> https://www.gnu.org/software/libc/manual/html_node/Hyperboli
>> c-Functions.html#Hyperbolic-Functions
>>
>>
>> On 06/11/2018 11:07 AM, Tobias Boege wrote:
>>
>>> On Mon, 11 Jun 2018, Demosthenes Koptsis wrote:
>>>
>>>> hello,
>>>>
>>>> according https://www.gnu.org/software/libc/manual/html_node/Hyperboli
>>>> c-Functions.html#Hyperbolic-Functions
>>>>
>>>> i have this external function
>>>>
>>>> 'double sinh (double x)
>>>> Public Extern sinh_C(x As Float) As Float Exec "sinh"
>>>>
>>>> but i get the error "cannot find symbol sinh in libc"
>>>>
>>>> why?
>>>>
>>>> Because it is in libm:
>>>
>>>    Extern my_sinh(f As Float) As Float In "libm:6" Exec "sinh"
>>>
>>>    Print Sinh(20)
>>>    Print my_sinh(20)
>>>
>>>    >242582597.704895
>>>    >242582597.704895
>>>
>>> At least on my system, the manpage of sinh tells you to "Link with -lm."
>>>
>>> Regards,
>>> Tobi
>>>
>>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180611/3de0a295/attachment-0001.html>


More information about the User mailing list