comp.lang.ada
 help / color / mirror / Atom feed
* Error when running gcc from GPS
@ 2010-04-24 11:03 resander
  2010-04-24 11:15 ` Simon Wright
  0 siblings, 1 reply; 10+ messages in thread
From: resander @ 2010-04-24 11:03 UTC (permalink / raw)


Using GPS GPL Edition.
GPS 4.2.1 (20080115) hosted on i686-pc-linux-gnu
GNAT 4.3.2

I have only just started using GPS.

I created a directory Adaproj in the home directory
and requested the default project to be put there.
It now contains the files main.adb, test.c
and default.gpr.

The file main.adb compiles, links and runs
without problems. It is a small self-contained test
program. The second file test.c does not
compile and the following error message appears:

'Could not locate executable on path: gprbuild'

I have ticked the checkbox for language C in the
Languages tab in 'Edit Project Properties on the
Project menu.

I am guessing that 'executable' refers to gcc.
I did a search on gcc and found these:

  /usr/bin/gcc    -- linked to
  /usr/bin/gcc-4.3

  /usr/bin/gnatgcc    -- linked to
  /usr/bin/gcc-4.3

  /home/ken/AdaGPL/gnat-2008-i686-gnu-linux-libc2.3-bin/bin/gcc

I also searched on gprbuild and found it is available in

 /home/ken/AdaGPL/gnat-2008-i686-gnu-linux-libc2.3-bin/bin


How do I make GPS compile C files?

P.S.
default.gpr in Adaproj contains:
project Default is

   type Mode_Type is
      ("Production", "Debug");
   Mode : Mode_Type := external ("BUILD", "Debug");

   package Ide is
      for Vcs_Kind use "CVS";
   end Ide;

   package Compiler is

      case Mode is

         when "Debug" =>
            for Default_Switches ("ada") use ("-g", "-gnato", "-fstack-
check", "-gnatVa");

         when "Production" =>
            for Default_Switches ("ada") use ("-gnatp", "-O2");
      end case;
   end Compiler;

   case Mode is

      when "Debug" =>
         for Languages use ("Ada", "C");

      when "Production" =>

   end case;

end Default;





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-04-25 17:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-24 11:03 Error when running gcc from GPS resander
2010-04-24 11:15 ` Simon Wright
2010-04-24 16:53   ` resander
2010-04-24 17:46     ` Ludovic Brenta
2010-04-25 10:41       ` resander
2010-04-25 17:12         ` Ludovic Brenta
2010-04-25 12:42   ` Stephen Leake
2010-04-25 15:07     ` resander
2010-04-25 17:13       ` Ludovic Brenta
2010-04-25 15:22     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox