From: ahlan.marriott@gmail.com
Subject: Re: Building an encapsulated library that uses GNAT sockets under Windows
Date: Sat, 23 Apr 2016 07:45:35 -0700 (PDT)
Date: 2016-04-23T07:45:35-07:00 [thread overview]
Message-ID: <33e880a1-df5f-450c-89e0-9b1d1a95e12f@googlegroups.com> (raw)
In-Reply-To: <nffgek$5sf$1@gioia.aioe.org>
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
next prev parent reply other threads:[~2016-04-23 14:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 12:59 Building an encapsulated library that uses GNAT sockets under Windows Dmitry A. Kazakov
2016-04-22 7:58 ` ahlan.marriott
2016-04-22 8:23 ` Dmitry A. Kazakov
2016-04-23 9:20 ` Ahlan
2016-04-23 9:48 ` Dmitry A. Kazakov
2016-04-23 14:45 ` ahlan.marriott [this message]
2016-04-23 19:56 ` Dmitry A. Kazakov
2016-04-23 21:16 ` Simon Wright
2016-04-24 8:13 ` ahlan
2016-04-24 8:31 ` Simon Wright
2016-04-26 19:43 ` ahlan.marriott
2016-04-26 20:24 ` Simon Wright
2016-04-26 22:32 ` Jeffrey R. Carter
2016-04-27 22:16 ` Randy Brukardt
2016-04-27 23:43 ` Jeffrey R. Carter
2016-04-28 5:18 ` J-P. Rosen
2016-04-28 5:59 ` Jeffrey R. Carter
2016-05-09 22:32 ` David Thompson
2016-04-28 20:23 ` Randy Brukardt
2016-04-28 21:47 ` Jeffrey R. Carter
2016-04-28 5:13 ` J-P. Rosen
2016-04-26 20:20 ` Dmitry A. Kazakov
2016-04-26 21:23 ` Simon Wright
2016-04-27 6:53 ` Simon Wright
2016-04-27 7:25 ` ahlan
2016-04-27 8:27 ` Dmitry A. Kazakov
2016-04-27 9:59 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox