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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be6e28f854440947 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to get the mouse position with JEWL? Date: Thu, 21 Oct 2010 20:24:23 +0300 Organization: Tidorum Ltd Message-ID: <8ibba8FdvvU1@mid.individual.net> References: <86bfa3ba-f67f-4ee2-95f6-c0c66ad08207@k22g2000yqh.googlegroups.com> <4cc06eac$0$6766$9b4e6d93@newsspool3.arcor-online.net> <84fbd137-d7d2-47e2-8cba-58e734d69d10@n26g2000yqh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net j5Bre7Nj4Qq7cMoyS0PrEgwFgLSLSMFjI2j9JNW7Gs+0El7Wzo Cancel-Lock: sha1:HUM1fNP+UDApDkHP3BvlaOZknPg= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: <84fbd137-d7d2-47e2-8cba-58e734d69d10@n26g2000yqh.googlegroups.com> Xref: g2news2.google.com comp.lang.ada:15632 Date: 2010-10-21T20:24:23+03:00 List-Id: tolkamp wrote: > On 21 okt, 18:47, Georg Bauhaus wrote: >> On 21.10.10 17:23, tolkamp wrote: >> >> >> >> >> >>> On 21 okt, 00:51, tmo...@acm.org wrote: >>>> This works for me for Windows >>>> type Points is record >>>> x,y : interfaces.c.int; >>>> end record; >>>> type bool is new interfaces.c.int; >>>> function GetCursorPos(point : access points) return bool; >>>> pragma import(stdcall,GetCursorPos, "GetCursorPos"); >>>> current : aliased points; >>>> ... >>>> if getcursorpos(current'access) = 0 then >>>> -- current now has mouse position >>>> else -- Windows error >>> When I include "with interfaces.c.int" the compilation results in >>> error: >>> Interface.C.Init is not a predefined library unit. >> "int" is the name of a type in package Interface.C. >> "With" that. >> >> Georg- Tekst uit oorspronkelijk bericht niet weergeven - >> >> - Tekst uit oorspronkelijk bericht weergeven - > > Yes, I understand, I suspect not... > but how to make the compilation error free? You should write, as Georg no doubt meant: with Interfaces.C; not "with Interfaces.C.Int". You always "with" a package or some other library unit (stand-alone subprogram), you do not "with" a type, even though that type is defined in a package. HTH, -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .