comp.lang.ada
 help / color / mirror / Atom feed
From: AJAskey <AskeyAJ@gmail.com>
Subject: Re: Trig Function Linking Problems
Date: 17 Apr 2007 02:59:26 -0700
Date: 2007-04-17T02:59:26-07:00	[thread overview]
Message-ID: <1176803966.623937.251290@e65g2000hsc.googlegroups.com> (raw)
In-Reply-To: <20ejmjj3ci.fsf@hod.lan.m-e-leypold.de>

Thanks for the responses.  I really think the pragma "c" call to the
actual Linux math library is not working.  I've had this same problem
many times over the years.  In "c", many times I would not get an
error message at link time if it could not find the correct library
with the sin(), cos(), etc calls.  The "c" function would "appear" to
work (step into somewhere in the debugger) but garbage was always
returned.  This appears to be what is happening.  Ada knows it is a
valid call and doesn't complain.  But somewhere in the depths of the
call nothing actually happens.

If I set b=1.0 then make the call b:=sin(a), b is changed to NaN.
Something is happening but definitely not the sine function.

If I had written the call then I would assume the code was wrong.  But
I am using code from the GNAT Ada library that works fine on a
different computer.  I'm pretty sure it has something to do with the
gnatlink activity.  Either something is defaulting correctly on the
working system that is not the default on the newer system, or it just
cannot find the library.  I tested the same simple algorithm in "c"
and it works fine - which means the library is available on the
system.

If anyone has any other ideas please let me know as this is a show
stopper.

Thanks.
Andy




  reply	other threads:[~2007-04-17  9:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 20:32 Trig Function Linking Problems AJAskey
2007-04-16 22:46 ` Jeffrey Creem
2007-04-16 23:39   ` Markus E Leypold
2007-04-17  9:59     ` AJAskey [this message]
2007-04-17 10:55       ` Markus E Leypold
2007-04-17 11:48         ` AJAskey
2007-04-17 12:05           ` Markus E Leypold
2007-04-17 12:32       ` Ludovic Brenta
2007-04-17  0:22 ` Jeffrey R. Carter
2007-04-17 16:58 ` Dirk Heinrichs
2007-04-17 18:54   ` AJAskey
2007-04-17 20:50     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox