Re: help with include and library files in GPS
- From: Ludovic Brenta <ludovic@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Feb 2006 22:49:18 +0100
"new" <ajahns@xxxxxxxxx> 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.
.
- Follow-Ups:
- Re: help with include and library files in GPS
- From: Simon Wright
- Re: help with include and library files in GPS
- References:
- help with include and library files in GPS
- From: new
- Re: help with include and library files in GPS
- From: Martin Krischik
- Re: help with include and library files in GPS
- From: new
- help with include and library files in GPS
- Prev by Date: Re: help with include and library files in GPS
- Next by Date: Re: ACATS Random failure under GNAT GCC
- Previous by thread: Re: help with include and library files in GPS
- Next by thread: Re: help with include and library files in GPS
- Index(es):