comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: help with include and library files in GPS
Date: Thu, 23 Feb 2006 22:49:18 +0100
Date: 2006-02-23T22:49:18+01:00	[thread overview]
Message-ID: <87zmkhn3tt.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1140730318.270710.16040@i39g2000cwa.googlegroups.com

"new" <ajahns@tscwo.com> writes:
> Well thanks, but I am still in confusion. I seem to have figured out
> that when I with something in my .gpr it will include that project
> and that is what I have to do to include a library. The problem is
> with I screw this up, it keeps recompiling the library.

Make sure that the .ali files for GtkAda are read-only (mode 0444, not
0644) and are present in the object directory of gtkada.gpr.

Remove the object files (*.o) from that directory.

Place libgtkada.a in /usr/lib.

> All I am trying to do is use Gtkada with gps. I have succeeded in
> installing and compiling Gtkada. I can link with gnatmake on the
> command line, but I want to do so in GPS.  I put the directory
> containing gtkada.gpr in the ADA_PROJECT_PATH. It still says in cannot
> find the library even though libgtkada.a seems to be where it is
> supposed to be.

In your project file, reference the exact location of libgtkada.a,
like so:

with "/usr/share/ada/adainclude/gtkada.gpr";
project Blah is
...
   package Linker is
      for Default_Switches ("Ada") use ("/usr/lib/libgtkada.a");
   end Linker;
end Blah;

> I have put the libgtkada.a everywhere I could thing of but GPS still
> says:
> gnatmake: no object files for library "gtkada"
>
> Any suggestions?
>
> Another thing is suppose there is a static and dynamic version of the
> library. How do I specify which one I want to use? Sometimes GPS says
> there is no .dll when I would prefer to use the static library.

with "/usr/share/ada/adainclude/gtkada.gpr";
project Blah is
...
   type Link_Type is ("Static", "Shared");
   Link : Link_Type := External ("Link_Type", "Static");
   package Linker is
      case Link is
         when "Static" => 
            for Default_Switches ("Ada") use ("/usr/lib/libgtkada.a");
         when "Shared" =>
            for Default_Switches ("Ada") use ("-lgtkada");
      end case;
   end Linker;
end Blah;

For full details, see
http://www.ada-france.org/debian/debian-ada-policy.html

HTH

-- 
Ludovic Brenta.



  reply	other threads:[~2006-02-23 21:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23 16:00 help with include and library files in GPS new
2006-02-23 18:41 ` Martin Krischik
2006-02-23 21:31   ` new
2006-02-23 21:49     ` Ludovic Brenta [this message]
2006-02-24 15:39       ` Simon Wright
2006-02-24 16:18         ` Ludovic Brenta
2006-02-24 10:33     ` Stephen Leake
2006-02-24 18:51     ` Martin Krischik
2006-02-24 20:42       ` new
2006-02-25 14:38   ` OT: " Steve
2006-02-26  9:35     ` Martin Krischik
2006-02-26 13:15       ` Larry Kilgallen
2006-02-27  2:13       ` Steve
2006-02-27  4:04         ` Jeffrey R. Carter
2006-02-27 14:22           ` Larry Kilgallen
2006-02-27 16:25             ` Larry Kilgallen
2006-02-27 16:58             ` Martin Krischik
2006-02-27 18:35             ` Jeffrey R. Carter
2006-02-27 16:48         ` Martin Krischik
2006-02-23 20:33 ` Simon Wright
replies disabled

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