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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Undefined reference errors and strange new files appearing Date: Sun, 22 Jun 2014 22:06:35 +0200 Organization: cbb software GmbH Message-ID: <6oe9n9t492cj$.1lnea40xr9xrr$.dlg@40tude.net> References: <1mzn30tk739yc.1xe0abn3udzik.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: qHNcUCBwwd01dPSBp/L1cg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:187167 Date: 2014-06-22T22:06:35+02:00 List-Id: 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