comp.lang.ada
 help / color / mirror / Atom feed
* problem getting gtkada to work
@ 2006-06-11  8:22 Michel Simeon
  2006-06-11  8:28 ` Dmitry A. Kazakov
  2006-06-11 21:38 ` Maxim Reznik
  0 siblings, 2 replies; 3+ messages in thread
From: Michel Simeon @ 2006-06-11  8:22 UTC (permalink / raw)


I am learning Ada and would like to use gtkAda.

I tried the exemple below, found in the web:

with Gtk.Main, Gtk.Window;
procedure Simple is
W : Gtk.Window.Gtk_Window;
begin
  Gtk.Main.Init;
  Gtk.Window.Gtk_New(W);
  Gtk.Window.Show(W);
  Gtk.Main.Main;
end Simple;

I am using Windows XP with GNAT 3.15p, AdaGIDE, and GtkAda 2.4.0

I put -IC:\GNAT\gtkada-2.4.0\include\gtkada as a compiler option in AdaGIDE
The program compiles, and then I get the following:

gnatlink -g simple.ali
:\GNAT\gtkada-2.4.0\include\gtkada\\libgtkada.a(misc.o.b)(.text+0x327f:1:
undefined reference to `SetCursorPos@8'
gnatlink: cannot call C:\GNAT\bin\gcc.exe
gnatmake: *** link failed.

I also tried to compile other exemples that come with the gtkada 
distribution and got exactly the same problem.

Could somebody help with some advise.

Michel Simeon





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

* Re: problem getting gtkada to work
  2006-06-11  8:22 problem getting gtkada to work Michel Simeon
@ 2006-06-11  8:28 ` Dmitry A. Kazakov
  2006-06-11 21:38 ` Maxim Reznik
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry A. Kazakov @ 2006-06-11  8:28 UTC (permalink / raw)


On Sun, 11 Jun 2006 10:22:20 +0200, Michel Simeon wrote:

> I am learning Ada and would like to use gtkAda.
> 
> I tried the exemple below, found in the web:
> 
> with Gtk.Main, Gtk.Window;
> procedure Simple is
> W : Gtk.Window.Gtk_Window;
> begin
>   Gtk.Main.Init;
>   Gtk.Window.Gtk_New(W);
>   Gtk.Window.Show(W);
>   Gtk.Main.Main;
> end Simple;
> 
> I am using Windows XP with GNAT 3.15p, AdaGIDE, and GtkAda 2.4.0
> 
> I put -IC:\GNAT\gtkada-2.4.0\include\gtkada as a compiler option in AdaGIDE
> The program compiles, and then I get the following:
> 
> gnatlink -g simple.ali
>:\GNAT\gtkada-2.4.0\include\gtkada\\libgtkada.a(misc.o.b)(.text+0x327f:1:
> undefined reference to `SetCursorPos@8'
> gnatlink: cannot call C:\GNAT\bin\gcc.exe
> gnatmake: *** link failed.
> 
> I also tried to compile other exemples that come with the gtkada 
> distribution and got exactly the same problem.
> 
> Could somebody help with some advise.

Have you specified -mwindows for gnatmake?

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



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

* Re: problem getting gtkada to work
  2006-06-11  8:22 problem getting gtkada to work Michel Simeon
  2006-06-11  8:28 ` Dmitry A. Kazakov
@ 2006-06-11 21:38 ` Maxim Reznik
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Reznik @ 2006-06-11 21:38 UTC (permalink / raw)


On Sun, Jun 11, 2006 at 10:22:20AM +0200, Michel Simeon wrote:
> gnatlink -g simple.ali
> :\GNAT\gtkada-2.4.0\include\gtkada\\libgtkada.a(misc.o.b)(.text+0x327f:1:
> undefined reference to `SetCursorPos@8'
> gnatlink: cannot call C:\GNAT\bin\gcc.exe
> gnatmake: *** link failed.
>
Follow this thread 
http://lists.adacore.com/pipermail/gtkada/2005-March/003268.html

In short you need to fix gtk.ads file.
Add line
   pragma Linker_Options ("-luser32");
After
private
   pragma Linker_Options ("-lgtkada");

-- 
Maxim Reznik




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

end of thread, other threads:[~2006-06-11 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11  8:22 problem getting gtkada to work Michel Simeon
2006-06-11  8:28 ` Dmitry A. Kazakov
2006-06-11 21:38 ` Maxim Reznik

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