GPS and ADA_OBJECT_PATH variables
Mathieu Dubois <[email protected]> Tue, 17 Aug 2010 10:53:36 +0200
| Newsgroups | gmane.comp.ide.gps.user |
|---|---|
| Message-ID | <[email protected]> |
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