[gps-users] "Executable" switches

Marc A. Criley adamac95@earthlink.net
20 Jul 2003 09:07:39 -0400


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`

process exited with status 4

If I put the gtkada-config command in double quotes:

   "`gtkada-config --static`"

and build, it appears to just ignore the command. I.e., I get a
compilation attempt, but errors that gtkada.ads can't be found.

In this situation I wondered if I perhaps also needed to explicitly
specify the gtkada-config command to use for individual Ada
compilations, so I added that to the Ada switches:

   "`gtkada-config --cflags`"

That resulted in the same "can't have -o and -c with multiple
compilations" error mentioned in a previous posting here.

How's this supposed to be done?

Marc A. Criley