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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93f13c4bf2e19e49,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-21 13:57:47 PST Path: archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail From: threestoners@yahoo.com (Brant) Newsgroups: comp.lang.ada Subject: Calling Custom C Functions From Ada Date: 21 Aug 2001 13:57:47 -0700 Organization: http://groups.google.com/ Message-ID: <8e205e9b.0108211257.4c56b7d9@posting.google.com> NNTP-Posting-Host: 139.73.1.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 998427467 25630 127.0.0.1 (21 Aug 2001 20:57:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 21 Aug 2001 20:57:47 GMT Xref: archiver1.google.com comp.lang.ada:12189 Date: 2001-08-21T20:57:47+00:00 List-Id: Hi Gang, I'm trying to call a custom C function from an Ada program. I've set my Ada program up using the INTERFACE pragma, but I can't seem to get the linker to locate the associated C object code. I've written and built my C functions using Microsoft Visual C++; I've tried both static and dynamic libraries, so I get the *.lib, *.obj files along with a *.exp file. I'm using a DDC-I DACS Ada compiler under Windows NT. When I link my Ada code, which one of the generated C files do I need to reference? No matter which I choose I get an "adalink: undefined reference to `MyFunction'" error, which is the same error I get when I don't even point to a file. Do I need to do some tweaking of the C files? Do I need to reference the specific function (as opposed to just a file) when I link? Any help would be greatly appreciated! Thanks, Brant