[gps-users] -o and -c with multiple compilations?

Marc A. Criley adamac95@earthlink.net
20 Jul 2003 08:46:27 -0400


--=-mBh6FGUxXDQgOd111YpE
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I've set up my project file (attached below), with nothing really arcane
as far as I know, I even used the Project Wizard to help build it.  But
whenever I try to build the project I get the following error:

gnatmake -d -P/home/g315p/dsx/src/gtkgui/gtkgui.gpr dv.adb 
gcc -c -g -gnatQ -o
/home/g315p/dsx/src/gtkgui/./dtraq-client_data_viewer.o -gnato
-fstack-check -g `gtkada-config --cflags` -gnatA
/home/g315p/dsx/src/gtkgui/./dtraq-client_data_viewer.adb
gcc: cannot specify -o with -c and multiple compilations
gnatmake: "dtraq-client_data_viewer.adb" compilation error

process exited with status 4


I think it's got something to do with having the `gtkada-config
--cflags` in the switches configuration, because when I don't, I just
get ordinary compilation errors ("Can't find gtkada.ads").

Marc A. Criley




--=-mBh6FGUxXDQgOd111YpE
Content-Disposition: attachment; filename=gtkgui.gpr
Content-Type: text/plain; name=gtkgui.gpr; charset=UTF-8
Content-Transfer-Encoding: 7bit

project Gtkgui is

   for Languages use ("Ada");
   for Source_Dirs use (".", "../mckae/", "../formatted_output/", "../dtqbase/", "../../contrib/");
   for Object_Dir use ".";
   for Main use ("dv.adb");

   package Compiler is
      for Default_Switches ("ada") use ("-gnato", "-fstack-check", "-g", "`gtkada-config", "--cflags`");
      for Default_Switches ("c") use ("-g");
      for Default_Switches ("c++") use ("-g");
   end Compiler;

   package Linker is
      for Default_Switches ("ada") use ("-g", "`gtkada-config", "--static`");
   end Linker;

   package Binder is
      for Default_Switches ("ada") use ("-E", "-static");
   end Binder;

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

end Gtkgui;


--=-mBh6FGUxXDQgOd111YpE--