From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Very basic question: How to use gnatmake (not gprbuild) using external libraries?
Date: Wed, 28 Jun 2023 09:20:05 +0200 [thread overview]
Message-ID: <u7gmv5$1mq6v$1@dont-email.me> (raw)
In-Reply-To: <021a84aa-a34d-4e19-bc14-8643532f001fn@googlegroups.com>
On 2023-06-28 01:44, Kenneth Wolcott wrote:
>
> 1. Where do I place the SDL library from GitHub?
That is up to you. It goes in /path/to/SDL/, where you choose /path/to/.
> 2. Do I compile/install the package?
The library may have specific compilation/installation instructions. Generally
you should follow those.
> 3. When using gnatmake do I use -I to specify where the library I'm referencing is found?
This depends on the answer to 2. If you have all the source files for the
library in /path/to/SDL/, and have compiled them so their .ali and .o files are
also there, then using -I/path/to/SDL/ works fine. This is simple and easy. As
S/W engineers always try to keep things as simple as possible, this is the
approach I tend to use.
Coders, on the other hand, like to introduce unnecessary complexity, and you
will find lots of projects with baroque directory structures, maybe with source
files in /path/to/SDL/src/, .ali and .o files in /path/to/SDL/lib/, test program
source files in /path/to/SDL/test/src, their .ali and .o files in
/path/to/SDL/test/lib/, and executables in /path/to/SDL/test/bin/. Such
directory structures are gnatmake unfriendly, and the simple -I approach doesn't
work. You'll have to look into the exact meaning of -I and -a, and maybe others.
> 4. Once #3 is answered, I assume that I "with package" as if the '*.ad[sb]' files were co-located with my Ada program, is that correct?
The Ada language definition is independent of how and where source and
compilation artifacts are stored, so context clauses are necessarily independent
of such concepts. In other words, yes. This kind of information is handled by
the compilation options such as -I.
--
Jeff Carter
"He nevere yet no vileynye ne sayde
In al his lyf unto no maner wight."
Canterbury Tales
156
next prev parent reply other threads:[~2023-06-28 7:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 23:44 Very basic question: How to use gnatmake (not gprbuild) using external libraries? Kenneth Wolcott
2023-06-28 7:20 ` Jeffrey R.Carter [this message]
2023-06-28 18:25 ` Kenneth Wolcott
2023-06-28 19:02 ` Jeffrey R.Carter
2023-06-28 19:34 ` Kenneth Wolcott
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox