From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Undefined reference errors and strange new files appearing Date: Sun, 22 Jun 2014 12:51:09 -0300 Message-ID: References: <1mzn30tk739yc.1xe0abn3udzik.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net aR4G1O0Jgq1tjdxKKMf/EA4yWeMRAst+R9L0Aeg1rOFh+Xbd8d Cancel-Lock: sha1:7SkKcrUJp92RUZ2CSLA1ZrHygPI= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <1mzn30tk739yc.1xe0abn3udzik.dlg@40tude.net> Xref: news.eternal-september.org comp.lang.ada:20513 Date: 2014-06-22T12:51:09-03:00 List-Id: 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. 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. So what is the usual development cycle of a project without a main subprogram (called "library" below)? The following? 1. Write the project file of the "library", be it as library or not. 2. Write an application (test-) project which imports the "library". 3. Compile the application in order to debug the imported "library". Iterate this step. 4. When the "library" is sufficiently mature, and if a real library is wanted, compile it as a library project. 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. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil