[gtkada] cannot find -lgtkada

Thierry Bernier thiberlog at free.fr
Tue Oct 3 22:44:39 CEST 2006


Adrian Knoth a écrit :
> On Wed, Oct 04, 2006 at 12:00:39AM +0900, Jimmy Ho wrote:
> 
>> Under DOS, I get the following error messages or combination of,
>> depending on which of the example programs I try to make:
>>
>> file "gtk.ads" not found
>> file "gdk.ads" not found
>> file "gtkada.ads " not found
>> Any ideas?
> 
> Sure. Set the include-Flags. As I've already mentioned:

The GNAT way is to use gpr files, I suppose. So you should run :

gnatmake mymain -Pmymain.gpr

The first line of mymain.gpr has to be :
with "gtkada.gpr";
And you should have an environement variable :
ADA_PROJECT_PATH=X:...\GtkAda\include_gtkada

I prefer not to set absolute path in GPR files. These GPR files should 
be in the examples directory. They are not, but are easy to rebuild. 
Following is one suitable for Helloworld :

with "gtkada.gpr";

project Helloworld is

    for Main use ("hello.adb");
    for Library_Kind use "dynamic";

    package Linker is
       for Default_Switches ("ada") use ("-s", "-Wl,--gc-sections", 
"-mwindows");
    end Linker;

    package Builder is
       for Default_Switches ("ada") use ("-s", "-g");
    end Builder;

    package Compiler is
       for Default_Switches ("ada") use ("-O2", "-gnatf", "-gnatp", "-g");
    end Compiler;

end Helloworld;


--
Thierry bernier



More information about the gtkada mailing list