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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,31c8255073b2d349 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!postnews.google.com!c32g2000vbq.googlegroups.com!not-for-mail From: Ada novice Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions, 20100901 release Date: Fri, 24 Sep 2010 03:18:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4eb2e449-a101-4cef-8297-b7585e98ea8d@c32g2000vbq.googlegroups.com> References: <889c1e51-cd27-4e7e-b5ae-b9e2c1c5b644@u6g2000yqh.googlegroups.com> <5c42e8bf-b12d-4c92-9eb6-5b056832352a@l20g2000yqe.googlegroups.com> <513c30f4-55f7-49de-8b17-9f932e726f36@d8g2000yqf.googlegroups.com> <95af4414-59b7-4567-9f88-ec808d54e6f0@u13g2000vbo.googlegroups.com> NNTP-Posting-Host: 130.240.232.147 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1285323486 1408 127.0.0.1 (24 Sep 2010 10:18:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 24 Sep 2010 10:18:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c32g2000vbq.googlegroups.com; posting-host=130.240.232.147; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14230 Date: 2010-09-24T03:18:05-07:00 List-Id: On Sep 23, 10:26=A0pm, Simon Wright wrote: > Ada novice writes: > > On Sep 6, 9:49=A0pm, Simon Wright wrote: > > >> In order to use this library within your own code, you need to use a > >> GPR referencing the extensions' GPR, "ada_math_build" [This name is > >> subject to change]. Either > > >> * say 'with "ada_math_build";' and include > >> =A0 /where/ever/gnat-math-extn-YYYYMMDD/src in your ADA_PROJECTS_PATH > >> =A0 environment variable; or > > >> * say 'with "/where/ever/gnat-math-extn-YYYYMMDD/src/ada_math_build";' > >> =A0 (this path can be relative, if you like)." > > > I asked about this earlier but didn't get an answer. Hopefully, > > someone will answer now. If I want to use the library with my own > > code, then how do I proceed? I tried the first solution (from above) > > but I don't know how to include /where/ever/gnat-math-extn-YYYYMMDD/ > > src in the ADA_PROJECTS_PATH environment variable. > > When I wrote "/where/ever/..." I was being guilty of being > Unix-centric. Sorry. > > The equivalent on Windows would be "X:\where\ever\...", in other words a > full file path from the top level downwards ('absolute' path). > > There's a reasonable-looking tutorial on Windows env vars athttp://www.ch= em.gla.ac.uk/~louis/software/faq/q1.html(select your > Windows version in the first paragraph). > > > As for the second solution, I understand that it can be either a / or > > a \ depending whether it's Windows or Linux. I have Windows and I > > tried /. I can't get this to work. And how do I put an absolute path? > > The GNAT compiler expects an identifier after with and it finds " and > > complains. > > As someone else said, GPRs are read by the gnatmake tool, not by the > compiler (I realise this is a hard distinction to make!). > > =A0 =A0gnatmake foo.adb =A0 =A0-- compile the Ada source foo.adb > =A0 =A0gnatmake -P foo.gpr -- read & obey the project file foo.gpr > > Windows gnatmake is quite happy to read forward-slash or backward-, I'm > not so sure about Unix gnatmake. > > You may find it easier to model your GPR on my test_extensions.gpr - > suppose that you've unpacked my package into C:\gnat-math-extn-20100911, > then your GPR would begin > > with "C:\gnat-math-extn-20100911\src\ada_math_build"; > project YC is > =A0 ... Thanks for the explanations. I'm a little pressed in time right now but I will look again in what you have written and tried again. As I mentioned in my earlier message, the solution I came up with was to put my piece of code in test_extensions.adb and remove parts of your code that I don't need. This is "working" for me. Yes I have read the test_extensions.gpr to understand the structure. I will definitely have to spend some time with the gprbuild manual in order to be at ease to handle these files and to be able to write gpr files on my own. cheers