From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1e11857ea4f39dd6,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!w1g2000hsg.googlegroups.com!not-for-mail From: "AJAskey" Newsgroups: comp.lang.ada Subject: Trig Function Linking Problems Date: 16 Apr 2007 13:32:42 -0700 Organization: http://groups.google.com Message-ID: <1176755562.190964.167640@w1g2000hsg.googlegroups.com> NNTP-Posting-Host: 199.46.199.230 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1176755562 31640 127.0.0.1 (16 Apr 2007 20:32:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Apr 2007 20:32:42 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 dfw-gate1.raytheon.com:8080 (Squid/2.4.STABLE7) Complaints-To: groups-abuse@google.com Injection-Info: w1g2000hsg.googlegroups.com; posting-host=199.46.199.230; posting-account=CYqfnw0AAAAF1B0yTvpOrbsgro2pqp2d Xref: g2news1.google.com comp.lang.ada:15065 Date: 2007-04-16T13:32:42-07:00 List-Id: Hi. We are moving some software from and ancient workstation to a newer one. The environment is still several years old but newer than the old-timer we are leaving. We cannot get the TRIG functions to work as there appears to be a problem interfacing to the library. The following test code works on the old-time system, but fails on two separate newer systems. Any help would be greatly appreciated. with ada.text_io; use ada.text_io; with ada.numerics.elementary_functions; procedure TRIG is a,b,c,d : float; begin a := 3.1415/4.0; b := ada.numerics.elementary_functions.sin(x=>a); c := ada.numerics.elementary_functions.cos(x=>a); d := ada.numerics.elementary_functions.tan(x=>a); put_line("sin(a)" & float'image(b)); put_line("cos(a)" & float'image(c)); put_line("tan(a)" & float'image(d)); put_line("a " & float'image(a)); end TRIG; >>From system with : GNATMAKE 3.13p (20000509) Copyright 1995-2000 Free Software Foundation, Inc. gcc 2.96 Linux Red Hat 7.1 2.96-98 [I don't need to do anything special except a gnatmake.] >>gnatmake trig gnatgcc -c trig.adb gnatbind -x trig.ali gnatlink trig.ali >>trig sin(a) 7.07090E-01 cos(a) 7.07123E-01 tan(a) 9.99954E-01 a 7.85375E-01 --------------------------------------------- >>From new system with : GNATMAKE 3.2.3-13 (20030502) Copyright 1995-2000 Free Software Foundation, Inc. gcc 3.2.3 Linux Red Hat 3.2.3-53 >>gnatmake trig gcc -c trig.adb gnatbind -x trig.ali gnatlink trig.ali >>trig raised CONSTRAINT_ERROR : s-imgrea.adb:236 [I tried linking in the -lm library which is required in the "c" version of this test. I also tried linking a few others, but continued to get the run-time error. On another similar system, the program ran but returned NaN in the debugger for b,c,d after the sin,cos,tan calls. I assume it really isn't finding the library.] >>gnatmake -c trig.adb >>gnatbind -x trig >>gnatlink -lm -lc -lgnat trig >>trig raised CONSTRAINT_ERROR : s-imgrea.adb:236 Any ideas what I should be linking in? Thanks much. Andy