comp.lang.ada
 help / color / mirror / Atom feed
* Win32Ada problems
@ 2009-08-25 13:39 Pablo
  2009-08-26  9:09 ` Stephen Leake
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo @ 2009-08-25 13:39 UTC (permalink / raw)


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? I did not get any source (yet)
available about this...
Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Win32Ada problems
  2009-08-25 13:39 Win32Ada problems Pablo
@ 2009-08-26  9:09 ` Stephen Leake
  2009-08-26 19:46   ` Chrono
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Leake @ 2009-08-26  9:09 UTC (permalink / raw)


Pablo <pablittto@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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Win32Ada problems
  2009-08-26  9:09 ` Stephen Leake
@ 2009-08-26 19:46   ` Chrono
  0 siblings, 0 replies; 3+ messages in thread
From: Chrono @ 2009-08-26 19:46 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-26 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25 13:39 Win32Ada problems Pablo
2009-08-26  9:09 ` Stephen Leake
2009-08-26 19:46   ` Chrono

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