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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.98.23.142 with SMTP id 136mr7918027pfx.6.1461422736257; Sat, 23 Apr 2016 07:45:36 -0700 (PDT) X-Received: by 10.157.5.74 with SMTP id 68mr157006otw.2.1461422736180; Sat, 23 Apr 2016 07:45:36 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!g8no5696918igr.0!news-out.google.com!k10ni34igv.0!nntp.google.com!sq19no256904igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 23 Apr 2016 07:45:35 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1205:c68c:9d90:bdd3:1936:5644:5c9b; posting-account=Pm0FhgoAAAAiPscNT3etSZ15tHNZGXm_ NNTP-Posting-Host: 2a02:1205:c68c:9d90:bdd3:1936:5644:5c9b References: <58a4942a-452a-4f32-b39b-f8f1fdbfe9fb@googlegroups.com> <68353b5d-94dc-4604-bdb1-00b48396ec1b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <33e880a1-df5f-450c-89e0-9b1d1a95e12f@googlegroups.com> Subject: Re: Building an encapsulated library that uses GNAT sockets under Windows From: ahlan.marriott@gmail.com Injection-Date: Sat, 23 Apr 2016 14:45:36 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:30259 Date: 2016-04-23T07:45:35-07:00 List-Id: On Saturday, 23 April 2016 11:49:13 UTC+2, Dmitry A. Kazakov wrote: > On 2016-04-23 11:20, Ahlan wrote: > > > The problem is not in Gprbuild.exe but in libexe/gprbuild/gprlib.exe > > Have you tried building Gprlib from the git sources? - that might be a more elegant solution. > > Yes I did. When you build gprbuild, it also builds all other utilities > including gprlib.exe. > > You can try it yourself. It is here: > > https://github.com/AdaCore/gprbuild > > There are two problems to fix to be able to do so: > > 1. OS_Lib does not contain Kill and Kill_Process_Tree gprclear requires. > You can comment them out. Kill is relatively easy, you must add win32ada > to the project and do: > > procedure Kill (Pid : Process_Id; Hard_Kill : Boolean) is > use Win32.Winbase; > use Win32.Winnt; > Process : HANDLE; > Result : Win32.BOOL; > begin > Process := OpenProcess > ( PROCESS_ALL_ACCESS, > 1, > Win32.DWORD (Pid_To_Integer (Pid)) > ); > Result := TerminateProcess (Process, 1); > end Kill; > > Kill_Process_Tree is more complicated, but could be just Kill (:-)) > > 2. There is a dynamic_constraint somewhere put on a type, that promptly > crashes the compiler. I removed it. > > However I was not aware of the directory ...\libexec\gprbuild. I > replaced only the executables in ...\bin. Thank you for the hint. Maybe > that would do the trick. I will try it next week and report back. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de Dear Dmitry, I downloaded the sources from Git using the link you supplied and built Gprlib.exe I could build this without the problems you mentioned. I guess these problem occur when you try and build the other utilities that GprBuild builds. However as I was only interested in Gprlib I only built that. I then copied this into the /libexe/gprbuild directory of my GNAT release and this then solved the problem. :-) Ie Using Gprlib.exe built from the latest git sources I was able to build a Windows encapsulated library (DLL) that uses Gnat.Sockets without have to use your Gcc_Wrapper workaround. Best wishes, Ahlan