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,b1cf4428bf3b72a4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Marc A. Criley" Newsgroups: comp.lang.ada Subject: Re: library files Date: Thu, 5 Aug 2004 10:52:19 -0500 Message-ID: <2nf3dmF8h9tU1@uni-berlin.de> References: X-Trace: news.uni-berlin.de icbXDZiYxezeWLp01D5AvQg52cFkvCe50zpgk93lBBBdvR0SMq X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:2583 Date: 2004-08-05T10:52:19-05:00 List-Id: "Harry Overs" wrote: > we've got some legacy Ada source code which we want to compile into a > library which will be accessed using a MS VC++ application. Although we've > managed to compile the ada code and turn the .o files into a library when it > comes to linking the C++ program we get thousands of errors which seem to > relate to system calls within the library (i.e. put method). > Do we need to do anything 'special' whilst creating the library or the > object files? at present we just use (from the command line): > > ar r myLib.lib *.o A bit more info is needed to answer this: What Ada compiler is being used? Have the Ada subprograms that are going to be called from C++ been designated with "pragma Export" if Ada 95, or if Ada 83, have the vendor's directions for invoking Ada from a non-Ada program been followed? Other libraries from the vendor's Ada runtime library may also need to be linked into the executable. Have those been identified? Is it assured that this Ada compiler's runtime library is interoperable with VC++? Not all are. (And if not, all is not lost--you can put a "messaging wrapper" around the Ada code and gin up a message-based communication protocol to invoke the Ada portion and pass data back and forth. Hurts performance, but the import of that depends on your application's purpose.) Marc A. Criley McKae Technologies www.mckae.com