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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!l16g2000pra.googlegroups.com!not-for-mail From: "s. ashen" Newsgroups: comp.lang.ada Subject: ada import c function Date: Tue, 28 Apr 2009 13:45:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6568256f-39cd-4757-a630-fe6e4a9a82fc@l16g2000pra.googlegroups.com> NNTP-Posting-Host: 193.108.250.115 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1240951507 14992 127.0.0.1 (28 Apr 2009 20:45:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 28 Apr 2009 20:45:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l16g2000pra.googlegroups.com; posting-host=193.108.250.115; posting-account=q1C47AoAAADrkQ5iQxb09dvcilJrHjad User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.59 Safari/525.19,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5599 Date: 2009-04-28T13:45:07-07:00 List-Id: Does anyone import C function to ada?? Using gnat 3.15, i try to compile the example which contain two files use_of_import.adb procedure Use_Of_Import is procedure Imported_Function; pragma Import (C, Imported_Function, "imported_function"); begin Imported_Function; end Use_Of_Import; imported_function.c #include imported_function () { printf ("\nI am now in the imported function\n\n"); } does anyone know how to compile this program, i had tried many in many ways, but i can't do this.. always occurred some errors.