comp.lang.ada
 help / color / mirror / Atom feed
* Alsys Ada and math package.
@ 1995-02-07 21:12 ab
  1995-02-09 14:39 ` David Wheeler
  0 siblings, 1 reply; 2+ messages in thread
From: ab @ 1995-02-07 21:12 UTC (permalink / raw)


Using Alsys Risc Ada (on Sun SS10, Solaris 2.3), how
do you make the math package available for use?

The following compiles fine but fails at link time:

with math_library; use math_library;

with TEXT_IO; use TEXT_IO;
procedure t is
    package REAL_IO is new FLOAT_IO(FLOAT); use REAL_IO;
    package new_math is new math(FLOAT); use new_math;
begin
 
 put(asinh(sqrt(6.25)),1,4,0);
 new_line;

end t;

% ada t.ada ; ald t

Undefined			first referenced
 symbol  			    in file
tan                                 C/double_precision_math.o
log                                 C/double_precision_math.o
log10                               C/double_precision_math.o
sinh                                C/double_precision_math.o
tanh                                C/math_lib_support.tanh_rad_s.o
sqrt                                C/double_precision_math.o
exp                                 C/double_precision_math.o
asin                                C/double_precision_math.o
acos                                C/double_precision_math.o
atan                                C/math_lib_support.atan_deg_s.o
sin                                 C/double_precision_math.o
cosh                                C/double_precision_math.o
cos                                 C/double_precision_math.o
ld: fatal: Symbol referencing errors. No output written to ../t


with thanks for your help,
ab
-- 

Dr. A.Bykat
Fuller E. Callaway Professor




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Alsys Ada and math package.
  1995-02-07 21:12 Alsys Ada and math package ab
@ 1995-02-09 14:39 ` David Wheeler
  0 siblings, 0 replies; 2+ messages in thread
From: David Wheeler @ 1995-02-09 14:39 UTC (permalink / raw)


ab@captblood.armstrong.edu wrote:
: Using Alsys Risc Ada (on Sun SS10, Solaris 2.3), how
: do you make the math package available for use?

: The following compiles fine but fails at link time:
: with math_library; use math_library;
: with TEXT_IO; use TEXT_IO;
: procedure t is
:     package REAL_IO is new FLOAT_IO(FLOAT); use REAL_IO;
:     package new_math is new math(FLOAT); use new_math;
: begin
:  put(asinh(sqrt(6.25)),1,4,0);
:  new_line;
: end t;

: % ada t.ada ; ald t

: Undefined			first referenced
:  symbol  			    in file
: tan                                 C/double_precision_math.o
: log                                 C/double_precision_math.o
...
: ld: fatal: Symbol referencing errors. No output written to ../t

You probably need to give "ald" an extra link-time option to tell
it to include the math library.
I'm not a user of Alsys Risc Ada, but Rational VADS and most
Unix C compilers require such options also when you use
floating point operations.

See if "ald" supports a "-l" (library) option.
If ald works like some other linkers, you may just need to insert "-lm"
(library - math) after the "ald" command.

--- David A. Wheeler
Net address: wheeler@ida.org



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-02-09 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-02-07 21:12 Alsys Ada and math package ab
1995-02-09 14:39 ` David Wheeler

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