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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a4f310457bd9cde1,start X-Google-Attributes: gid103376,public From: Maxwelton Subject: Calling Ada from C Date: 2000/08/25 Message-ID: <8o6pf3$m0i$1@nnrp1.deja.com>#1/1 X-Deja-AN: 662520518 X-Http-Proxy: 1.1 x64.deja.com:80 (Squid/1.1.22) for client 205.149.60.17 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Aug 25 21:46:17 2000 GMT X-MyDeja-Info: XMYDJUIDmaxwelton Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) Date: 2000-08-25T00:00:00+00:00 List-Id: I am missing something in a program I am working on. I am using a C function to call a function in Ada. I have the function defined in a ".h" file as an "extern". It takes a string as a parameter. In Ada I have a function with the same name defined along with the export pragma in the .ads file. The C function name is the 3rd parameter. If I were calling "C" from Ada I would use the import pragma. The .adb file has the function containing procedure To_Ada (Item : in char_array; Target : out String; Count : out Natural; Trim_Nul : in Boolean := True); I am using the Interfaces.C package in my ada files. My files compile but the C compilation generates an error that states "undefined function". What am I not doing? -- Maxwelton Sent via Deja.com http://www.deja.com/ Before you buy.