From: Chrono <pablittto@gmail.com>
Subject: Re: Win32Ada problems
Date: Wed, 26 Aug 2009 12:46:23 -0700 (PDT)
Date: 2009-08-26T12:46:23-07:00 [thread overview]
Message-ID: <20909323-125b-42db-aaed-68a08e43ca2c@h21g2000yqa.googlegroups.com> (raw)
In-Reply-To: u7hwrosaa.fsf@stephe-leake.org
On 26 ago, 06:09, Stephen Leake <stephen_le...@stephe-leake.org>
wrote:
> Pablo <pablit...@gmail.com> writes:
> > I´m trying to compile some win32ada files bjut I get the following
> > error:
> > gcc -c withall.adb
> > win32-winnt.ads:2642:05: representation item appears too late
> > win32-winnt.ads:2645:05: representation item appears too late
> > win32-winnt.ads:2658:05: representation item appears too late
> > win32-winnt.ads:2659:05: representation item appears too late
> > gnatmake: "withall.adb" compilation error
> > Support libraries built.
>
> > Someone knows how to solve it?
>
> Apparently the version of win32-winnt.ads you are using violates some
> Ada rule, and the Ada compiler version you are using enforces that
> rule.
>
> You have a few choices:
>
> Get a newer version of win32-winnt.ads
>
> Use an older version of the Ada compiler
>
> Edit win32-winnt.ads
>
> If you got the compiler and win32-winnt.ads as a single distribution,
> then you should report the problem to the vendor so they can fix it.
>
> --
> -- Stephe
Just answering to myself (and for anyone's knowledge purposes...) this
problem can be solved moving the pragmas in the lines of the problems
to after the respective full variable declaration. For example,
win32-winnt.ads:2642:05: representation item appears too late
is related to
pragma Convention(C, anonymous1_t); -- winnt.h:186.
The path to solve this problem is to put the sentence
pragma Convention(C, anonymous1_t); -- winnt.h:186
after the full declaration of anonymous1_t variable. So we have :
type anonymous1_t is --
winnt.h:
186
record
LowPart : Win32.DWORD; --
winnt.h:
184
HighPart: Win32.LONG; --
winnt.h:
185
end record;
pragma Convention(C, anonymous1_t); -- winnt.h:186
That´s it.
prev parent reply other threads:[~2009-08-26 19:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 13:39 Win32Ada problems Pablo
2009-08-26 9:09 ` Stephen Leake
2009-08-26 19:46 ` Chrono [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