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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,cef7b4ec6046abaf X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!h21g2000yqa.googlegroups.com!not-for-mail From: Chrono Newsgroups: comp.lang.ada Subject: Re: Win32Ada problems Date: Wed, 26 Aug 2009 12:46:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: <20909323-125b-42db-aaed-68a08e43ca2c@h21g2000yqa.googlegroups.com> References: <2203f454-0cb2-4c28-b50d-a3cdbaebb2aa@18g2000yqa.googlegroups.com> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1251315984 29450 127.0.0.1 (26 Aug 2009 19:46:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 26 Aug 2009 19:46:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h21g2000yqa.googlegroups.com; posting-host=201.7.145.1; posting-account=n9Sa1woAAACZc_iwSjaEkj9Lnt-XVrSr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8004 Date: 2009-08-26T12:46:23-07:00 List-Id: On 26 ago, 06:09, Stephen Leake wrote: > Pablo writes: > > I=B4m 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=B4s it.