From: Patrick <patrick@spellingbeewinnars.org>
Subject: help bridging C and Ada
Date: Sun, 25 Mar 2012 06:37:02 -0700 (PDT)
Date: 2012-03-25T06:37:02-07:00 [thread overview]
Message-ID: <c4221180-bf2d-48d1-a161-c56435805200@b14g2000vbz.googlegroups.com> (raw)
Please forgive any ignorance in this post. I am not a professional
programmer. In fact this is why I am attracted to Ada. I believe the
strict compiler will substitute for years of experience with buggy
languages. This seem to be an overlooked feature of the language.
While I am planning on using it for embedded use later, at the moment
it is all desktop and as you know, it's a world dominated by C and
it's cousins.
I am having some luck with gnat's -fdump-ada-spec feature and I can
use it to integrate simple C functions I have written.
However when I try to bind large libraries like gstreamer I end up
with a sort of dependency hell. -fdump-ada-spec-slim just generates
the one spec file but when I try to build with the generated spect, I
get errors about other spec files missing. Without the slim option I
get about 100 specs. I tried to "with" them all but I ended up with
more errors about circular dependencies.
I've also tried pragma import. I can get an executable compiled but
when I call it I get errors like: stack overflow (or erroneous memory
access)
that was with with Gstreamer and I had others errors when I tried the
same process with gtk.
All I really need is a way to create a small bridge between a C
application and an Ada one. Is there a way to do this without creating
such a deep interface with fdump? Should I try the pragma route some
more or is this feature problematic?
I am not attracted to pipes but is this a more sensible option?
If anyone would like me to post code please let me know.
Thanks for reading-Patrick
next reply other threads:[~2012-03-25 13:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-25 13:37 Patrick [this message]
2012-03-25 14:52 ` help bridging C and Ada Patrick
2012-03-25 17:00 ` Simon Wright
2012-03-25 17:47 ` Patrick
2012-03-26 13:45 ` Stephen Leake
2012-03-26 10:03 ` Brian Drummond
2012-03-26 12:05 ` J-P. Rosen
2012-03-26 22:03 ` Brian Drummond
2012-03-27 2:44 ` Patrick
2012-03-26 12:49 ` Marc C
2012-03-27 18:09 ` Shark8
2012-03-28 0:19 ` Patrick
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox