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,31c8255073b2d349 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions, 20100901 release Date: Thu, 23 Sep 2010 21:26:23 +0100 Organization: A noiseless patient Spider Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 23 Sep 2010 20:26:23 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="24365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VL34WeOrEdJYVUwlzPnRyk9bw1wk2Wuc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:Llb8YlUchfrgZHc004K2J0dKHw4= sha1:/t7Q5T439tialmk8cWQ2U3dA0bc= Xref: g2news1.google.com comp.lang.ada:14213 Date: 2010-09-23T21:26:23+01:00 List-Id: Ada novice writes: > On Sep 6, 9:49 pm, 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 >>   /where/ever/gnat-math-extn-YYYYMMDD/src in your ADA_PROJECTS_PATH >>   environment variable; or >> >> * say 'with "/where/ever/gnat-math-extn-YYYYMMDD/src/ada_math_build";' >>   (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 at http://www.chem.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!). gnatmake foo.adb -- compile the Ada source foo.adb gnatmake -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 ...