comp.lang.ada
 help / color / mirror / Atom feed
* win32 bindings with GNAT GPL 2009?
@ 2009-06-17 20:01 Bob Spooner
  2009-06-18  7:19 ` Dmitry A. Kazakov
  2009-06-18  7:25 ` Gautier write-only
  0 siblings, 2 replies; 4+ messages in thread
From: Bob Spooner @ 2009-06-17 20:01 UTC (permalink / raw)


I am trying to use GPS to build an application that needs the win32 bindings 
that I downloaded and installed along with GNAT GPL 2009, but can't figure 
out how to set the project properties to resolve the symbols and include the 
library. I've searched the documentation without success (but I can't find 
things in the refrigerator either.) Does win32 have to be installed _before_ 
the compiler or something?
Bob 





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

* Re: win32 bindings with GNAT GPL 2009?
  2009-06-17 20:01 win32 bindings with GNAT GPL 2009? Bob Spooner
@ 2009-06-18  7:19 ` Dmitry A. Kazakov
  2009-06-18  7:25 ` Gautier write-only
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2009-06-18  7:19 UTC (permalink / raw)


On Wed, 17 Jun 2009 16:01:52 -0400, Bob Spooner wrote:

> I am trying to use GPS to build an application that needs the win32 bindings 
> that I downloaded and installed along with GNAT GPL 2009, but can't figure 
> out how to set the project properties to resolve the symbols and include the 
> library.

An executable project could be kind of this:

with "win32ada.gpr";
project My_Project is
   type Development_Type is ("Debug", "Release");
   Development : Development_Type := external ("Development", "Debug");
   for Source_Dirs use (".");
   for Main use ("my_main.adb");
   
   case Development is
      when "Release" =>
         for Object_Dir use "Release";
      when "Debug" =>
         for Object_Dir use "Debug";
   end case;

   package Builder is
      case Development is
         when "Release" =>
            for Default_Switches ("ada") use ("-s");
         when "Debug" =>
            for Default_Switches ("ada") use ("-g");
      end case;
   end Builder;

   package Binder is
      case Development is
         when "Release" =>
            for Default_Switches ("ada") use ();
         when "Debug" =>
            for Default_Switches ("ada") use ("-E");
      end case;
   end Binder;

   package Compiler is
      case Development is
         when "Release" =>
            for Default_Switches ("ada") use
               ("-gnato", "-gnatf", "-O2", "-gnatn", "-gnat05");
         when "Debug" =>
            for Default_Switches ("ada") use
               ("-gnato", "-gnatf", "-g", "-fstack-check", "-gnat05");
      end case;
   end Compiler;

   package Linker is
      case Development is
         when "Release" =>
            for Default_Switches ("ada") use
               ("-O2", "-s",  "my_resource.o", "-mwindows");
         when "Debug" =>
            for Default_Switches ("ada") use
               ("-g", "-lgmem", "my_resource.o", "-mwindows");
      end case;
   end Linker;

end My_Project;

my_resource.o is the resource object file, which you have to compile it
like:

windres -i my_resource.rc -o my_resource.o

> I've searched the documentation without success (but I can't find 
> things in the refrigerator either.) Does win32 have to be installed _before_ 
> the compiler or something?

No, it must be installed after the compiler was.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: win32 bindings with GNAT GPL 2009?
  2009-06-17 20:01 win32 bindings with GNAT GPL 2009? Bob Spooner
  2009-06-18  7:19 ` Dmitry A. Kazakov
@ 2009-06-18  7:25 ` Gautier write-only
  2009-06-27 14:54   ` Rob Solomon
  1 sibling, 1 reply; 4+ messages in thread
From: Gautier write-only @ 2009-06-18  7:25 UTC (permalink / raw)


Bob:

> I am trying to use GPS to build an application that needs the win32 bindings
> that I downloaded and installed along with GNAT GPL 2009, but can't figure
> out how to set the project properties to resolve the symbols and include the
> library. I've searched the documentation without success (but I can't find
> things in the refrigerator either.) Does win32 have to be installed _before_
> the compiler or something?

Do you have linker symbol issues, if I understand well ?
Then, it might well be an issue of the new release, affecting usage of
Win32 routines (with or without use of win32ada).
You may want to report it to: report@gnat.com (with a meaningful
title).
Meanwhile, you can use GPS 2009 with GNAT 2008 (it works!).
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/

NB: For a direct answer, e-mail address on the Web site!



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

* Re: win32 bindings with GNAT GPL 2009?
  2009-06-18  7:25 ` Gautier write-only
@ 2009-06-27 14:54   ` Rob Solomon
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Solomon @ 2009-06-27 14:54 UTC (permalink / raw)


I am playing w/ Ada for the first time.  I d/l and installed the 2009
versions of gnat-gps & win32.  I first installed gnat-gpl and then
win32ada.  I got errors when I tried to run the GPS.  I installed
gnat-gps again, and win32ada again, on top of themselves.  Now all
seems to be working.  But I have not tried to compile anything fancier
than "Hello World" yet.

On Thu, 18 Jun 2009 00:25:29 -0700 (PDT), Gautier write-only
<gautier_niouzes@hotmail.com> wrote:

>Bob:
>
>> I am trying to use GPS to build an application that needs the win32 bindings
>> that I downloaded and installed along with GNAT GPL 2009, but can't figure
>> out how to set the project properties to resolve the symbols and include the
>> library. I've searched the documentation without success (but I can't find
>> things in the refrigerator either.) Does win32 have to be installed _before_
>> the compiler or something?
>
>Do you have linker symbol issues, if I understand well ?
>Then, it might well be an issue of the new release, affecting usage of
>Win32 routines (with or without use of win32ada).
>You may want to report it to: report@gnat.com (with a meaningful
>title).
>Meanwhile, you can use GPS 2009 with GNAT 2008 (it works!).
>_________________________________________________________
>Gautier's Ada programming -- http://sf.net/users/gdemont/
>
>NB: For a direct answer, e-mail address on the Web site!



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

end of thread, other threads:[~2009-06-27 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 20:01 win32 bindings with GNAT GPL 2009? Bob Spooner
2009-06-18  7:19 ` Dmitry A. Kazakov
2009-06-18  7:25 ` Gautier write-only
2009-06-27 14:54   ` Rob Solomon

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