comp.lang.ada
 help / color / mirror / Atom feed
* help bridging C and Ada
@ 2012-03-25 13:37 Patrick
  2012-03-25 14:52 ` Patrick
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Patrick @ 2012-03-25 13:37 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-03-28  0:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-25 13:37 help bridging C and Ada Patrick
2012-03-25 14:52 ` 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

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