comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Undefined reference errors and strange new files appearing
Date: Sun, 22 Jun 2014 22:06:35 +0200
Date: 2014-06-22T22:06:35+02:00	[thread overview]
Message-ID: <6oe9n9t492cj$.1lnea40xr9xrr$.dlg@40tude.net> (raw)
In-Reply-To: c0ocbfF5ba2U1@mid.individual.net

On Sun, 22 Jun 2014 12:51:09 -0300, hreba wrote:

> On 06/22/2014 02:56 AM, Dmitry A. Kazakov wrote:
>>
>> Did you build your library? Usually, when using a library as an OS library,
>> you need two projects, one in order to build the library and another to use
>> it. Then each projects would likely have several scenarios depending on
>> whether the library is relocatable or static (and debugging or release).
>>
>> P.S. b~files are generated by GNAT when building an executable. Ignore
>> them.
> 
> Yes, I built the library. I do not really need an OS library, I just 
> thought that this is the only way to compile something without a main 
> subprogram in it.

You can always compile any file using gcc, gnatmake, gprbuild, GPS.

> I found extensive documentation (GBRbuild User's Guide 
> in /usr/share/doc/gprbuild-doc/html/gprbuild_ug.html) on how to build a 
> library and very little on how to import it.

It is still unclear if "library" means:

1. An OS-library such as *.lib, *.a, *.dll, *.so?

2. A set of Ada's library-level packages organized in a separate project,
yet not producing an OS-library?

For #2, you just make a plain Ada project (not a library project as you
did).

You refer to that project from the test project ("with" it). Then you open
the test project and you will see the referenced project and all its files
in the GPS' project view in a separate folder.

You can edit, compile these files the same way you do test project files.
When you build the test project they are automatically compiled as
necessary.

> Up to now, I always have been compiling my libraries on its own in order 
> to correct syntactical errors, only then I switched to (test-) 
> applications importing them.

You can do all work using the test project. No need to switch projects.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-06-22 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-21 22:21 Undefined reference errors and strange new files appearing hreba
2014-06-22  5:56 ` Dmitry A. Kazakov
2014-06-22  9:04   ` Georg Bauhaus
2014-06-22 16:08     ` hreba
2014-06-22 15:51   ` hreba
2014-06-22 20:06     ` Dmitry A. Kazakov [this message]
2014-06-22 20:30       ` hreba
2014-06-22 20:43   ` Simon Wright
2014-06-22 20:50 ` Simon Wright
2014-06-24  1:56   ` hreba
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox