33 questions
0
votes
0
answers
124
views
gprbuild: Shared libraries between multiple projects
I have a couple of executables that I want to be able to use the same libraries. After building, I want the tree to look like this (simplified example):
Root
|--Prog1
| |--src
| |--obj
| |--Prog1....
0
votes
1
answer
84
views
How to run a pre build script in gnat project file?
I have a mixed C++ and Ada project.
A GPRbuild project is used to build it and there is no makefile.
There is a script which creates an H file with constants such as build host, username and git ...
3
votes
4
answers
345
views
How can I add an additional compiler option in an Alire .toml file?
For cross-compilation I need to specify the MCU type as a option to the Ada, C and theoretically C++ compiler.
How can I do that and in a way that it is also applied when building the dependencies?
At ...
4
votes
1
answer
236
views
Ada: Gnat Gprbuild Add a binary library with no .adb to a project
I have built a static library in Ada with Gnatstudio/Gprbuild. Now, I would like to use it in a executable project, but I only want to give .ads files and binary .a. No .adb.
My executable project gpr ...
1
vote
0
answers
142
views
Ada: (gpr)install package with multiple shared libraries
I have an Ada library project creating a shared library that has dependencies on other prebuilt shared libraries (c/c++). Unfortunately the prebuilt libraries can’t be installed system wide and I am ...
3
votes
0
answers
116
views
GPRbuild: relocation truncated to fit R_X86_64
I'm dealing with huge global lists in Ada. When building I'm getting the error during linking:
relocation truncated to fit R_X86_64_PC32 and link of main.adb failed.
I saw that GCC has the flag -...
2
votes
4
answers
875
views
Ada Gnat project which includes differently-named files for different build configurations
I have a Gnat/Gprbuild project with several build configurations. I have a main source file and an secondary ads file which the main source file includes:
with Secondary_File; use Secondary_File;
The ...
0
votes
0
answers
248
views
GPRBUILD and multiple file suffix (.cc, .cpp)
The GNAT Project files (.gpr) allow to specify the suffix of source code for compilation.
For example:
package Naming is
for Spec_Suffix ("c++") use ".h";
for Body_Suffix (&...
1
vote
0
answers
292
views
Why does gprbuild behave differently when building a library on Linux and Windows?
I'm porting a dynamic Ada library from Windows to CentOS 7 with the following options:
for Library_Kind use "dynamic";
for Library_Auto_Init use "False";
for Library_Interface use (...
4
votes
1
answer
195
views
Is it possible to have a file wildcard in gprbuild project files?
I have a project in which I often create a lot of new main entrypoint *.adb files in a certain directory. Is there any way to set up my project using gprbuild such that adding a new main program does ...
2
votes
1
answer
834
views
Link object file to project with gprbuild
Using nvcc I created an object file from my project with the following bash script:
nvcc -Xcompiler -std=c99 -dc src/interface.cu src/functions.cu
nvcc -dlink interface.o functions.o -o obj/link.o
In ...
4
votes
1
answer
210
views
How to use nvcc with gprbuild?
I have a code in Ada that must use CUDA without using the Ada binding. So I made an interface that allows the Ada program to call C code. Now I want to compile it.
How can I tell gprbuild to not use ...
3
votes
1
answer
128
views
Link math.h with gprbuild
I'm trying to build an Ada application that calls C code. The C code use the function sqrt from math.h. If I remove the call to sqrt, the compilation and linkage work perfectly. When I try with the ...
3
votes
1
answer
585
views
Can gprbuild be configured to output gnatprep preprocessed sources?
I have a gpr project which uses gnatprep to preprocess source files. But now I have a tool which needs the already preprocessed source files. I know that I can hunt down each source file and run it ...
2
votes
0
answers
158
views
Building a DLL for Windows with a specific base address
I am working on a project for a Windows library in Ada that must be compiled in a DLL, starting from a .gpr project via GPRBuild. I was able to produce a working DLL for Windows, but now I want to ...