From: Kenneth Wolcott <kennethwolcott@gmail.com>
Subject: Re: Very basic question: How to use gnatmake (not gprbuild) using external libraries?
Date: Wed, 28 Jun 2023 11:25:26 -0700 (PDT) [thread overview]
Message-ID: <9054de21-ec44-479f-adde-a65933cc5e44n@googlegroups.com> (raw)
In-Reply-To: <u7gmv5$1mq6v$1@dont-email.me>
On Wednesday, June 28, 2023 at 12:20:09 AM UTC-7, Jeffrey R.Carter wrote:
> 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/.
Cool.
> > 2. Do I compile/install the package?
> The library may have specific compilation/installation instructions. Generally
> you should follow those.
Ok.
> > 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.
Use "-I/path", but do not use "-L/path"?
> 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.
Yeah, I like to keep things simple as well :-)
I'm not sure I understand the distinction between "-I/path" and "-L/path". I think when one includes ("-I/path") something it will be compiled along with what I'm trying to compile and when I use "-L/path" it means use *.obj, *.ali, etc at the linking stage. Is that correct?
> > 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.
Thank you for the info!
Now I will make a new post regarding the compilation error I received with the SDL package.
Thanks,
Ken Wolcott
> --
> 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 18:25 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
2023-06-28 18:25 ` Kenneth Wolcott [this message]
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