From: Oliver Kleinke <oliver.kleinke@c-01a.de>
Subject: Re: SDL Bindings?
Date: Thu, 2 Jan 2014 20:04:15 +0100
Date: 2014-01-02T20:04:15+01:00 [thread overview]
Message-ID: <20140102200415.080b3e99@vostro> (raw)
In-Reply-To: eba57c2d-f647-43a9-9452-8e5b6b537e74@googlegroups.com
Am Thu, 2 Jan 2014 10:29:26 -0800 (PST)
schrieb Marius Amado-Alves <amado.alves@gmail.com>:
> Trying RtAudio.
> First step is build a C++ test program on the command line.
> After many hours joggling the respective black arts, succeeded on
> Windows with a g++ command and many options. Now theoretically this
> can be transposed to gnatmake... My plan is to make a C wrapper
> (around the C++ RtAudio code) that we can bind from Ada using
> Interfaces.C and company (Ada does not talk to C++, or does she?)
>
> /*
> This is not programming:-(
> The code, the libraries are there.
> Why is it so difficult to integrate these things?
> Indeed we still have not met the principal challenge of computer
> science viz. "How not to make a mess of it" (Dijkstra) */
It is indeed possible to bind to C++. Here is a "gem" - [1] - from ACT
that covers the subject. The main issue that makes binding to C++ so
ugly is the name-mangling. Also the difference in the OOP design
(tagged types / packages vs. classes) can make it un-intuitive at times.
Plus, you'll probably need a compiler that supports it. I've only
worked with GNAT, I don't know which other compilers can do it.
If binding is a such a major problem, then honestly, why not just
write your audio-related code in C/C++ and bind to a small set of
functions that you then call from Ada.
--
[1] -
http://www.adacore.com/adaanswers/gems/gem-60-generating-ada-bindings-for-c-headers/
next prev parent reply other threads:[~2014-01-02 19:04 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 [this message]
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
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