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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c1bdceb867926fdb,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k19g2000yqc.googlegroups.com!not-for-mail From: Ada novice Newsgroups: comp.lang.ada Subject: Interfacing Ada with C Date: Sat, 24 Jul 2010 04:57:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 193.11.22.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1279972673 28085 127.0.0.1 (24 Jul 2010 11:57:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 24 Jul 2010 11:57:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k19g2000yqc.googlegroups.com; posting-host=193.11.22.91; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12517 Date: 2010-07-24T04:57:53-07:00 List-Id: Hi, Having some background in C and in Ada, I would like to have some examples on how to interface codes between these two languages. I loved Ada but scientific computing libraries are not available. So I was thinking to use an available numeric library in C to do some mathematical operations such as calculations of eigenvalues and eigenvectors from data in an Ada program. Ada does provide some routines for eigenvalues and eigenvectors computations but they aren't suitable for a non-symmetric matrix. Information on interfacing Ada with C is scarce on the web and it would help much if I can get some simple examples here from which I can build up. So in essence I'm looking for examples which illustrate how to pass some data (e.g a matrix) from Ada to C, do some computations on the matrix and return the results to the Ada environment. I understand that a matrix can always be converted into a sequential row of data which can be stored say in a file and then be passed to a C numerical routine for some mathematical operation and then be returned back to Ada likewise in the form of a data stored sequentially in a file. Thanks YC