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: a07f3367d7,c98f618755b0ddcc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Thinking of using Ada for a job at home. Couple of questions first. Date: Tue, 09 Mar 2010 20:32:10 +0000 Organization: A noiseless patient Spider Message-ID: References: <6ggto5p3g2p58839gdsut6idb2l621nv2c@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Tue, 9 Mar 2010 20:32:10 +0000 (UTC) Injection-Info: news.motzarella.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="19795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LuN5Wd0sAK0lmJprduN0EmI+OoJ53XF4=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) Cancel-Lock: sha1:HTEO3oQIAHI6E0mdpuw4DIjGzsA= sha1:Nj3ycyURwi/aA7fyUoJh0eRfVrU= Xref: g2news1.google.com comp.lang.ada:9495 Date: 2010-03-09T20:32:10+00:00 List-Id: Warren Gay writes: > Another approach might be to create a "binding translator". > Feed a C/C++ preprocessed output into the translator and > crank out some ugly but functional package(s). c2ada and SWIG are two projects in this area. I wouldn't recommend c2ada (although I am at present a developer), because at some point before the migration to Sourceforge someone had the grand idea of translating C bodies as well as headers, but failed to carry it through. Haven't used SWIG. As Jacob says, GNAT includes this ability. As I recall, the generated code will be OS-specific; provided the original headers were reasonably sane this should be OK.