Je tente de compiler une application GtkAda très simple en ligne de commande, sous Windows. Voici le code de l'application:Comment utiliser GtkAda en ligne de commande?
`WITH Gtk.Main ; USE Gtk.Main ;
WITH Gtk.Window ; USE Gtk.Window ;
PROCEDURE Test01 IS
win : Gtk_window ;
BEGIN
Init ;
Gtk_New(Win) ;
Win.show_all ;
Main ;
END Test01 ;`
Compiler avec
gcc -c test01.adb -IC:\<<path_to_GtkAda\include\gtkada>>
, -je obtenir test.ali et test01.o comme prévu.
Mais comment lier les libs s'il vous plaît?
gcc test.o -LC:\<<path_to_GtkAda>>\lib
donne:
`Test01.o:Test01.adb:(.text+0xe): undefined reference to `gtk__main__init'
Test01.o:Test01.adb:(.text+0x21): undefined reference to `gtk__window__gtk_new'
Test01.o:Test01.adb:(.text+0x3e): undefined reference to `__gnat_rcheck_CE_Access_Check'
Test01.o:Test01.adb:(.text+0x5e): undefined reference to `gtk__main__main'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: Test01.o: bad reloc address 0x20 in section `.eh_f
rame'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status`
PATH contient déjà <<path_to_GtkAda>>/bin
Merci.
Merci beaucoup pour votre réponse! :-) +1 Je vais essayer ça! –