comp.lang.ada
 help / color / mirror / Atom feed
From: Fionn Mac Cumhaill <invisible@hiding.from.spam>
Subject: Re: [anouncement] MingGW release for the GNU Ada Project
Date: Wed, 06 Feb 2008 12:46:32 GMT
Date: 2008-02-06T12:46:32+00:00	[thread overview]
Message-ID: <nnajq316gpbpnsdncp7e555hfb88eova21@4ax.com> (raw)
In-Reply-To: e2pfq35njaeu57e769u36fp3gn70fhscim@4ax.com

On Tue, 05 Feb 2008 04:30:31 GMT, Fionn Mac Cumhaill
<invisible@hiding.from.spam> wrote:

>On Mon, 04 Feb 2008 08:51:57 +0100, Martin Krischik
><krischik@users.sourceforge.net> wrote:
>
>>Fionn Mac Cumhaill schrieb:
>>> On Sun, 03 Feb 2008 10:19:38 +0100, Martin Krischik
>>> <krischik@users.sourceforge.net> wrote:
>>> 
>>>> Fionn Mac Cumhaill wrote:
>>>>
>>>>> I finally got around to trying this out today and it crashed - it
>>>>> wants to have libintl-8.dll and it's nowhere to be found.
>>>> Did you install MinGW itself - you will need it. This is also one of the
>>>> advantages of AdaCore releases: they invested the time to tear all needed
>>>> parts out of MinGW to provide a one .EXE install. We are far from that so
>>>> you need to install MinGW.
>>>>
>>>> Follow instruction on 
>>>>
>>>> http://gnuada.sourceforge.net/pmwiki.php/Install/MinGW
>>>> http://gnuada.sourceforge.net/pmwiki.php/TAR/MinGW
>>>>
>>>>
>>>> Martin
>>> 
>>> I already have MinGW and MSYS installed;
>>> 
>>> The problem turned out to be gettext; I found a copy of gettext-0.16
>>> that was a part of an attempt to build gcc 4.2.1 from source; the
>>> gettext subtree contained a copy of the missing dll. I copied it to a
>>> directory on my Windows path and the immediate problem went away.
>>> 
>>> I couldn't find libintl-8.dll in any of the gettext tarballs from the
>>> MinGW SourceForge site.
>>
>>I see - BTW: gettext is on the to-do list:
>>
>>http://gnuada.svn.sourceforge.net/viewvc/gnuada/trunk/mingw/SCRIPTS/Make_Get_Text.bash?view=markup
>>
>>But it has proven tricky.
>>
>>Martin
>
>Note that I haven't had time yet to actually use anything in
>/opt/gnat/gcc/bin in a non-trivial way; I have only invoked them in
>ways such as
>
>gcc -v 
>or 
>strings --help
>
>etc, to verify that they don't crash immediately; there may very well
>be other problems that turn up when I have time for more detailed
>testing.

Ok, I have done a bit of testing. GCC Bugzilla bug 33420 is still
present. Test case included below. Everything after the row of
asterisks is intended as input to gnatchop. Beware of line wraps.

******
-- test2.adb

with GWindows.Types;
with GWindows.XBase;

procedure Test2

is
  My_Handle: GWindows.Types.Handle;

begin
  My_Handle := GWindows.XBase.Handle (GWindows.XBase.Focus.all);  --
This is the offending line.
  null;
end Test2;-- gwindows.ads
package GWindows is

end GWindows;
--gwindows.types.ads

with Interfaces.C;

package GWindows.Types is

   subtype Handle is Interfaces.C.long;

end GWindows.Types;
-- gwindows-xbase.ads

with Ada.Finalization;

with GWindows.Types;

with Interfaces.C;

package GWindows.XBase is
   use type Interfaces.C.unsigned;

   type Base_Window_Type is
     new Ada.Finalization.Limited_Controlled with private;
   type Base_Window_Access is access all Base_Window_Type;
   type Pointer_To_Base_Window_Class is access all
Base_Window_Type'Class;

   procedure Finalize (Object : in out Base_Window_Type);

   function Focus return Pointer_To_Base_Window_Class;

   procedure Focus (Window : in out Base_Window_Type);

   type Base_Data_Type is tagged null record;
   type Base_Data_Access is access all Base_Data_Type;
   type Pointer_To_Base_Data_Class is access all Base_Data_Type'Class;

   function Handle (Window : in Base_Window_Type)
                   return GWindows.Types.Handle;
private
   type Base_Window_Type is new Ada.Finalization.Limited_Controlled
with
      record
         HWND : GWindows.Types.Handle := 0;
      end record;
end GWindows.XBase;
-- gwindows-xbase.adb

with Interfaces.C;

package body GWindows.XBase is

   use type Interfaces.C.long;

   --------------
   -- Finalize --
   --------------

   procedure Finalize (Object : in out Base_Window_Type) is
     pragma Warnings (Off, Object);
   begin
     null;
   end Finalize;

   -----------
   -- Focus --
   -----------

   function Focus return Pointer_To_Base_Window_Class
   is
   begin
     return null;
   end Focus;

   -----------
   -- Focus --  !!!! If this procedure is removed, the bug box goes
away !!!!
   -----------

   procedure Focus (Window : in out Base_Window_Type) is
      procedure SetFocus  (hwnd : GWindows.Types.Handle);
      pragma  Import (StdCall, SetFocus, "SetFocus");
   begin
      SetFocus (Window.HWND);
   end Focus;

   ------------
   -- Handle --
   ------------

   function Handle
     (Window : in Base_Window_Type)
      return GWindows.Types.Handle
   is
   begin
      return Window.HWND;
   end Handle;

end GWindows.XBase;



      reply	other threads:[~2008-02-06 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 12:28 [anouncement] MingGW release for the GNU Ada Project Martin Krischik
2008-02-03  1:42 ` Fionn Mac Cumhaill
2008-02-03  9:19   ` Martin Krischik
2008-02-03 14:07     ` Fionn Mac Cumhaill
2008-02-04  7:51       ` Martin Krischik
2008-02-05  4:30         ` Fionn Mac Cumhaill
2008-02-06 12:46           ` Fionn Mac Cumhaill [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox