comp.lang.ada
 help / color / mirror / Atom feed
From: Luke A. Guest <laguest@archeia.com>
Subject: Re: SDL Bindings?
Date: Sat, 4 Jan 2014 18:16:02 +0000 (UTC)
Date: 2014-01-04T18:16:02+00:00	[thread overview]
Message-ID: <1225369347410552014.162769laguest-archeia.com@nntp.aioe.org> (raw)
In-Reply-To: 20140104120206.659e8e80@vostro

Oliver Kleinke <oliver.kleinke@c-01a.de> wrote:
> Am Fri, 3 Jan 2014 05:06:39 -0800 (PST)
> schrieb Marius Amado-Alves <amado.alves@gmail.com>:
> 
>>> Yes, the dump-ada-spec function. Trying that now. Seems to work.
>> 
>> It doesn't. The result does not compile (I was tricked into thinking
>> it did by GPS somehow). The generated code is illegal. A few faults I
>> could solve by hand. But there are circular dependencies (winnt <-->
>> windef) and other hard or impossible to solve faults.
>> 
>> It might be useful for discovering the mangled names.
> 
> Sure it's not a magic bullet. Even for C code -fdump-ada-spec does at
> times generate sub-optimal code. You always have to - at the least -
> check the generated code or clean it by hand. I Just wanted to give you
> a pointer to some example code that shows how the Ada code for binding
> to C++ looks like.

You'll never be able to write decent bindings to c++ from Ada due to the
fact that most c++ programmers keep inlining constructors meaning you
either have to reclass everything yourself or know which class' constructor
to call.

It's better to wrap in C and bind to that.

Luke

  reply	other threads:[~2014-01-04 18:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21  4:30 SDL Bindings? krfkeith
2013-09-21 16:51 ` Oliver Kleinke
2013-09-21 21:59 ` Luke A. Guest
2013-09-21 23:24 ` gautier_niouzes
2013-09-22  0:29   ` Luke A. Guest
2013-09-23  5:59   ` krfkeith
2013-09-24  9:25     ` Marius Amado-Alves
2013-09-25  5:38       ` Thomas Løcke
2014-01-02 14:32         ` Marius Amado-Alves
2014-01-02 18:29           ` Marius Amado-Alves
2014-01-02 19:04             ` Oliver Kleinke
2014-01-03 11:30               ` Marius Amado-Alves
2014-01-03 12:05               ` Marius Amado-Alves
2014-01-03 13:06                 ` Marius Amado-Alves
2014-01-04 11:02                   ` Oliver Kleinke
2014-01-04 18:16                     ` Luke A. Guest [this message]
2014-01-04 18:32                       ` Marius Amado-Alves
2014-01-04 22:12                         ` Luke A. Guest
2014-01-06  4:10                           ` Lucretia
2018-08-01 12:54                         ` Marius Amado-Alves
2018-08-01 15:11                           ` Jacob Sparre Andersen
2018-08-01 21:49                           ` Lucretia
2018-08-02 14:44                             ` Marius Amado-Alves
2013-09-25  0:39 ` krfkeith
replies disabled

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