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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70265a5aadd5f024,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!g12g2000prg.googlegroups.com!not-for-mail From: Nasser Abbasi Newsgroups: comp.lang.ada Subject: gnatmake, gnat2007. Linking to lapack and blas using with Ada.Numerics.Generic_Real_Arrays; Date: Fri, 10 Aug 2007 16:34:23 -0700 Organization: http://groups.google.com Message-ID: <1186788863.427210.175620@g12g2000prg.googlegroups.com> NNTP-Posting-Host: 68.5.76.154 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1186788864 21158 127.0.0.1 (10 Aug 2007 23:34:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 10 Aug 2007 23:34:24 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g12g2000prg.googlegroups.com; posting-host=68.5.76.154; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1396 Date: 2007-08-10T16:34:23-07:00 List-Id: These are the steps I did to link a small ada program with lapack and blas libraries which are needed if one uses some of the the new packages such as Ada.Numerics.Generic_Real_Arrays and its linear algebra functions. Here is the gnatmake command: $ gnatmake solve.adb -largs -L/usr/lib -lgnala -llapack -lblas gcc -c solve.adb gnatbind -x solve.ali gnatlink solve.ali -L/usr/lib -lgnala -llapack -lblas On linux Ubuntu, I used adept_manger to install blas and lapack, then after that, added the following symbolic links (which the link above would fail otherwise): su - cd /usr/lib ln -s liblapack.so.3 liblapack.so ln -s libblas.so libblas.so.3 This is the ada program (just to test with, no data in matric to do an actual solve) --------------- solve.adb-------------- $ cat solve.adb with Ada.Numerics.Generic_Real_Arrays; procedure solve is package myReals is new Ada.Numerics.Generic_Real_Arrays(Float); use myReals; nElements: constant integer:=6; A: Real_Matrix(1..nElements,1..nElements):=(others => (others => 0.0)); b: Real_Vector(1..nElements):=(Others=>0.0); begin b:=solve(A,b); end solve; ------------- solve-------------------- Nasser