[gps-users] GPS and ADA_OBJECTS_PATH variable

Mathieu Dubois mathieu.dubois at limsi.fr
Mon Sep 20 18:28:24 CEST 2010


After some time doing something else, I'm back on this project...

Just to remind you my problem:
  - variable ADA_OBJECTS_PATH is set in login and non-login shells
  - the program compiles and links correctly from the shell with 
gnat-make -P project_file program
  - if I start GPS from the explorer link fails
  - if I start GPS from a shell it works

Any idea?


On 08/17/2010 10:53 AM, Mathieu Dubois wrote:
> Hello,
>
> For my project I need to link to the APQ library (this library allow an
> Ada program to connect to a  database).
> As required by the installation manual I have set the ADA_INCLUDE_PATH
> and ADA_OBJECTS_PATH to the place where APQ is installed:
> $ echo $ADA_OBJECTS_PATH
> /home/duboism/adalib
> $ echo $ADA_OBJECTS_PATH
> /home/duboism/adalib
> The variables are set in ~/.bashrc (I work under Ubuntu 10.04).
>
> I can compile and link my program from the command line without problem.
>
> But when I try to compile it from GPS the link fails (note that the
> compilation works so APQ.ads is found):
> gnatlink
> /home/duboism/Documents/These/Code/manips/rvg/manips/COLD/Article1/objs/test_bayesian_filtering.ali
> -o
> /home/duboism/Documents/These/Code/manips/rvg/manips/COLD/Article1/test_bayesian_filtering
> /usr/bin/ld: cannot find -lapq
> collect2: ld returned 1 exit status
> gnatlink: error when calling /usr/bin/gcc-4.4
> gnatmake: *** link failed.
>
> There are 2 obvious solutions to that:
>    1) edit the project file to add the right switch to gnatlink
>    2) launch GPS from a shell (where ADA_INCLUDE_PATH and
> ADA_OBJECTS_PATH are set)
>
> I don't want to use solution 1 because then I would need to change the
> project file for use on another computer (eg with a different login).
>
> Solution 2 seems reasonable but I wonder why GPS doesn't take into
> account the ADA_OBJECTS_PATH variable. Is there any way to do that?
>
> Thanks in advance,
> Mathieu
>
>
> _______________________________________________
> gps-users mailing list
> gps-users at lists.adacore.com
> /no-more-mailman.html
>    



More information about the gps-users mailing list