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: 103376,b29ea596843b99f5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.231.138 with SMTP id tg10mr21271862pbc.7.1332816243462; Mon, 26 Mar 2012 19:44:03 -0700 (PDT) Path: z9ni5899pbe.0!nntp.google.com!news2.google.com!postnews.google.com!w5g2000vbv.googlegroups.com!not-for-mail From: Patrick Newsgroups: comp.lang.ada Subject: Re: help bridging C and Ada Date: Mon, 26 Mar 2012 19:44:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5c736b58-398b-4b1e-9e9b-1d1a2b78c11b@w5g2000vbv.googlegroups.com> References: NNTP-Posting-Host: 69.159.21.71 Mime-Version: 1.0 X-Trace: posting.google.com 1332816243 10835 127.0.0.1 (27 Mar 2012 02:44:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 27 Mar 2012 02:44:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w5g2000vbv.googlegroups.com; posting-host=69.159.21.71; posting-account=cUi90woAAADTaOISowbbHM8GUD0-opJO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-03-26T19:44:02-07:00 List-Id: Hi Brian, Hi J-P, Hi Marc, Hi Stephe Thanks for all your feedback. Yes I really don't want to write a full binding, especially as I am new to ada. It's my understanding that a C function ends up as a macro in ASM during the compilation process and it is even possible for some people to call them in executables without having had the original source code. It's my understanding that foreign function interfaces work much the same way only it is easier as there is source code involved. I wrote a very simple C application the uses gtk and gstreamer. I split it into two even simpler applications. I have edited the results from fdump slim so that I am only trying to call one C function. It won't compile as it wants other spec files for gtk. This is quite advanced for me. Would I be better off sticking to bindings that had no external dependencies? Is there a way to call one specific function without becoming entangled with the rest of the C application? Thanks again Brian. I at least 5 errors the first time I tried to compile the gstreamer binding and after I commented out the problematic "withs" I had more and more, I'm really bombing this. Thanks for sharing your tools, J-P, AdaDep looks interesting. Thanks again to everyone. Sorry if I am clutter the list with my newbie stupidity.