How to get gcc search path for Ada specs

The main question :

How can I get gcc to indicate where it searches for Ada includes?

Specific problem :

I just finished converting the C library header files to the Ada specification so that I can interact with the library using Ada . Now I want to install the specifications on my system. I also want to make the installation transfer to some extent so that I can make install on any machine (and thus host the specifications and Makefile on Github or the like). I just don’t know where exactly to set the specifications.

+4
source share
1 answer

gnat ls -v will provide you with default search paths.

If you want to install your own Ada library, you must put the project file (.gpr) in the "Project Search Path", which tells gnat where you can find the ada and ali files and the library.

Usually you place ada files in /usr/[local/]include/myadalib and ali files in /usr/[local/]lib/myadalib and possibly /usr/[local/]lib/myadalib .so file to /usr/[local/]lib , but you can put them anywhere. It is important to place the project file (myadalib.gpr) in the project search path.

You can even customize the project search path by setting the environment variable ADA_PROJECT_PATH.

+4
source

Source: https://habr.com/ru/post/1393688/


All Articles