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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 20 Feb 2011 04:47:18 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Sun, 20 Feb 2011 10:50:06 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> <4d605e67$0$23753$14726298@news.sunsite.dk> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-kmCfUWF2RRX3HF/YE7KyLx+14hsvPg0ZoJyOlnZLODaOXuO4tZUaqBVsUBqCGKttQ6CHRewQJMCF5y5!1lyuEG6+npny7ttQqjfnY8S+kdH4sxQUCL9AaKr78nGnDzq5bV1XQe9s6vMXj+LfHJYQfydY6HAt!sc8= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1994 Xref: g2news2.google.com comp.lang.ada:18451 Date: 2011-02-20T10:50:06+00:00 List-Id: On 20 Feb 2011 00:20:56 GMT, "Luis P. Mendes" wrote: >Sat, 19 Feb 2011 13:07:58 +0000, Brian Drummond escreveu: > >Would you mind giving me an example? >Please consider the following C++ code: >===== header file > $ cat aleatorio.h ... >===== > >>From Ada, how can I use these h and cpp files to call, for example, >gerarAleatorioInteiro(0,10)? > Start with gcc -c -fdump-ada-spec aleatorio.h (assuming a suitably recent gcc!) Or see http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Generating-Ada-Bindings-for-C-and-C_002b_002b-headers.html#Generating-Ada-Bindings-for-C-and-C_002b_002b-headers No promises but I'll try to make an example with your code today. - Brian