comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: Ada binding to GMP and MPFR
Date: Thu, 28 May 2009 20:30:34 -0400
Date: 2009-05-28T20:30:34-04:00	[thread overview]
Message-ID: <nospam-2DB376.20303428052009@news.aioe.org> (raw)
In-Reply-To: e3f56e11-e04b-41ce-9eb9-6d9a48cc73ad@n4g2000vba.googlegroups.com

In article 
<e3f56e11-e04b-41ce-9eb9-6d9a48cc73ad@n4g2000vba.googlegroups.com>,
 "vincent.diemunsch@gmail.com" <vincent.diemunsch@gmail.com> wrote:

> On 28 mai, 21:41, "John B. Matthews" <nos...@nospam.invalid> wrote:
> > In article
> > <b7a9794d-9973-4d85-9e09-c3c0e14b5...@v4g2000vba.googlegroups.com>,
> >
> >  "vincent.diemun...@gmail.com" <vincent.diemun...@gmail.com> wrote:
> >
> > [...]
> >
> > <http://code.google.com/p/adabindinggmpmpfr/source/browse/>
> >
> > > I have now added the files in the svn source tree !
> >
> > It's visible now.
> >
> > > I will add a little comment for Mac OS X users.
> >
> > Excellent!
> >
> > > I still have a little trouble in my sample program for the
> > > "translation" of the C sample program, with the function mpfr_out_str
> > > BUT I find the example of the Thick Ada Binding quite convincing :
> >
> > Looks good. I saw only two anomalies:
> >
> > 1) In mpfr_example.adb, line 75 should perhaps invoke New_Line, rather
> > than Skip_Line.
> >
> > 2) Inmpfr.ads, line 686, I had to specify a different external name:
> >
> >    pragma Import (C, mpfr_out_str, "__gmpfr_out_str");
[...]
> Thanks John for your help ! ;-)
> I have corrected the sources and added some little improvements.

Looks good. Thank you for your fine binding. Here is a simple Makefile 
I've  been using; feel free to adapt it to your project:

TARG = mpfr_example

CARGS = -cargs -O2
BARGS = -bargs -shared
LARGS = -largs -dead_strip -lmpfr -lgmp

UNAME = $(shell uname)
GCCV = $(shell gcc -dumpversion)

.SUFFIXES:
.PHONY: clean cleaner debug run

$(TARG): $(TARG).ad[bs]
    @echo $(UNAME): gcc $(GCCV)
    gnatmake $(TARG) $(CARGS) $(BARGS) $(LARGS)

debug: $(TARG).ad[bs]
    gnatmake -g $(TARG) $(LARGS)

run:$(TARG)
    ./$(TARG)

clean:
    rm -f *.o *.ali b~* core

cleaner: clean
    rm -f *.s $(TARG)

[Note, make requires tab for indent.]
-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>



  reply	other threads:[~2009-05-29  0:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 14:19 Ada binding to GMP and MPFR vincent.diemunsch
2009-05-20 14:30 ` Ludovic Brenta
2009-05-20 15:24   ` qunying
2009-05-27 15:35     ` vincent.diemunsch
2009-05-27 17:47       ` John B. Matthews
2009-05-28 12:47         ` vincent.diemunsch
2009-05-28 19:41           ` John B. Matthews
2009-05-28 20:23             ` vincent.diemunsch
2009-05-29  0:30               ` John B. Matthews [this message]
2009-05-29 12:01   ` vincent.diemunsch
2009-05-29 17:08     ` qunying
2009-05-29 16:55 ` Pascal Obry
replies disabled

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