[gps-users] "Executable" switches

Preben Randhol randhol@pvv.org
Mon, 21 Jul 2003 10:33:35 +0200


"Marc A. Criley" <adamac95@earthlink.net> wrote on 21/07/2003 (10:27) :
> For GtkAda compilations, I need to put `gtkada-config` alone or with
> some flags as part of the compilation/build switches command line.
> 
> Since I sometimes need to build with a static GtkAda, the command to add
> to the switches configuration is:
> 
>    `gtkada-config --static`
> 
> When I attempt to build, however, I get this error:
> 
> gnatmake -d -P/home/g315p/dsx/src/gtkgui/gtkgui.gpr dv.adb 
> gnatmake: unknown switch: --static`

I son't know much about the Gnat project files, but I don't think you
can write it like: `gtkada-config --static`

The reason is that the ` ` meaning are that what is between should be
executed. If you put it in a text file I think the gnat will not execute
this part. What you could do in a shell is:

`gtkada-config --static` > gtkada-static

and now include the content of gtkada-statix in the project file.

It should look like: 

   -I/usr/local/include/gtkada -largs /usr/local/lib/libgtkada.a
   -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
   -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
   -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

However this will only be safe for your system as somebody else might
have installed gtkada in a different directory.

But as I said I don't know gpr so perhaps you can specify somewhere that
it should run a script and catch the return.

-- 
Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 --
                 «For me, Ada95 puts back the joy in programming.»