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: 103376,4d1b41004c1d217c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!30g2000yqm.googlegroups.com!not-for-mail From: tolkamp Newsgroups: comp.lang.ada Subject: Re: How to interface in ADA with Microsoft joystick? Date: Tue, 12 Oct 2010 02:52:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <2edbcdab-8ff5-40e6-9ac0-44be6cb93621@m15g2000yqm.googlegroups.com> <1cd6pmbvbsnkb$.uwz2048291is.dlg@40tude.net> <3a82f59a-129f-46b1-bd0c-eae124136590@26g2000yqv.googlegroups.com> <0402e3f7-151c-4a51-bd61-44f4fc32a9d1@l20g2000yqm.googlegroups.com> <1thnsl7r3l217.1g1mvpwzjokvr.dlg@40tude.net> <1ntdrf2b9blvx.1qzgqdxqb9jvn$.dlg@40tude.net> <1lj7ed5rhng0p.5cwwj78z71lz.dlg@40tude.net> NNTP-Posting-Host: 62.163.210.190 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1286877127 24177 127.0.0.1 (12 Oct 2010 09:52:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 12 Oct 2010 09:52:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 30g2000yqm.googlegroups.com; posting-host=62.163.210.190; posting-account=nZAcngoAAACcfYM9wDw3w9Z1XR3bObfs User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14488 Date: 2010-10-12T02:52:07-07:00 List-Id: On 12 okt, 09:25, "Dmitry A. Kazakov" wrote: > On Mon, 11 Oct 2010 13:24:33 -0700 (PDT), tolkamp wrote: > > Now the compilation of my project is error free. > > I have tried to build an executable of my project, but again an error: > > > gnatmake -d -PC:\\GNAT\\bin\\joystick.gpr joystick_main.adb > > gnatbind -I- -x C:\GNAT\joystick_main.ali > > gnatlink C:\GNAT\joystick_main.ali -o C:\GNAT\joystick_main.exe > > c:/gnat/2009/bin/../libexec/gcc/i686-pc-mingw32/4.3.4/ld.exe: cannot > > find -lwin32ada > > collect2: ld returned 1 exit status > > gnatlink: error when calling C:\GNAT\2009\bin\gcc.exe > > gnatmake: *** link failed. > > > Here the contents of the project file (joystick.gpr): > > > project Joystick is > > =A0 =A0for Source_Dirs use (".", "..\2009\include\win32ada"); > > =A0 =A0for Object_Dir use "..\"; > > =A0 =A0for Main use ("joystick_main.adb"); > > =A0 =A0for Library_Dir use "..\2009\lib\win32ada"; > > end Joystick; > > You must use 'with "win32ada.gpr";' in your project: > > with "win32ada.gpr"; > project Joystick is > =A0 =A0for Source_Dirs use ("."); > =A0 =A0for Main use ("joystick_main.adb"); > =A0 =A0package Linker is > =A0 =A0 =A0 for Default_Switches ("ada") use ("-mwindows"); > =A0 =A0end Linker; > end Joystick; > > [ And you should never use absolute paths and just any paths to any > external directories. ] > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de- Tekst uit oorspronkelijk b= ericht niet weergeven - > > - Tekst uit oorspronkelijk bericht weergeven - I have changed the project file joystick.gpr with your solution. Building the executable gives the following result: gnatmake -d -PC:\\GNAT\\bin\\joystick.gpr joystick_main.adb gnatbind -I- -x C:\GNAT\bin\joystick_main.ali error: "win32-mmsystem.adb" must be recompiled ("win32-mmsystem.ads" has been modified) gnatmake: *** bind failed. Recomplilation of the package win32-mmsystem.adb results in: gnatmake -ws -c -u -PC:\\GNAT\\bin\\joystick.gpr win32-mmsystem.adb gnatmake: objects up to date. Building again results in the same error (***bind failed).