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-Thread: a07f3367d7,d8e3cd3d8dbaa4fb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.72.165 with SMTP id e5mr845480pav.4.1343200170916; Wed, 25 Jul 2012 00:09:30 -0700 (PDT) Path: p10ni53901309pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!ctu-gate!news.nctu.edu.tw!usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? Date: Sat, 21 Jul 2012 21:59:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6ad7682d-0fd7-472d-a305-99074cb4f7d8@googlegroups.com> References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> <87mx2ucags.fsf@ludovic-brenta.org> <500AA31F.8060004@obry.net> NNTP-Posting-Host: 69.20.190.126 Mime-Version: 1.0 X-Trace: posting.google.com 1342933178 18623 127.0.0.1 (22 Jul 2012 04:59:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 22 Jul 2012 04:59:38 +0000 (UTC) Cc: Randy Brukardt In-Reply-To: <500AA31F.8060004@obry.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-07-21T21:59:38-07:00 List-Id: On Saturday, July 21, 2012 6:39:59 AM UTC-6, Pascal Obry wrote: > Randy, >=20 >> And of course, the situation on Windows is very different. The basic OS = API=20 >> (Win32) is defined via a set of DLL interfaces that are consistent acros= s=20 >> all modern versions of Windows specifically so binary compatibility is= =20 >> possible. No C is really required there, either. >=20 > I don't see your point. Interfacing to a DLL is just like interfacing to > C or whatever. No, not really. The whole point of dynamic- vs. static-linking [libraries] = is that in the case of the former it eliminates the need to recompile [your= application] if the underlying DLL's implementation is changed, with stati= c-linking this is not so, any change in the library mandates a recompile/re= link of your application. It's somewhat like the interface/body separate compilation in Ada but appli= ed to the software-system instead of the language/compiler-system. With interfacing to another language the compiler has to know certain thing= s about that language, most specifically symbol-generation, argument orderi= ng and calling-conventions. {This is the whole reason for the convention pr= agma.} > In fact the Win32 DLL API are in C, same on Linux where > the lib C is used, no? On Windows you interface to fopen() as done on > UNIXes I suppose or maybe to an even higher level using OpenFile(). Not necessarily. So long as the Win32 API DLL presents the same interface t= o the world its internals could be ASM, Prolog, Ada, LISP, etc. And so long= as the compiler is able to generate calls/returns to properly interface wi= th the DLL the actual language of the compiler doesn't matter either.