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: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!news.mb-net.net!open-news-network.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: texttools and standard library packages Date: Thu, 12 Dec 2013 19:00:16 +0100 Organization: cbb software GmbH Message-ID: References: <83jfa95ibgj73rsr9r8d038plvrm6m4d8d@4ax.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: K+4Sku9d0Ugkd/hEqjWvjA.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 X-Original-Bytes: 2462 Xref: number.nntp.dca.giganews.com comp.lang.ada:184237 Date: 2013-12-12T19:00:16+01:00 List-Id: On Thu, 12 Dec 2013 19:44:58 +0200, Niklas Holsti wrote: > On 13-12-12 14:34 , agent@drrob1.com wrote: >> So I decided to use uio_ and uio2_ programs. These >> compiled. But generated lots of linker unresolved symbol errors. The >> commandline I used was: >> >> gnatmake -g -gnatf -gnato -fstack-check -gnatVa -gnatwu -gnat2012 -lm >> -lncurses > > If you want to specify more (non-Ada) libraries to be linked into your > Ada program, you should either use the pragma Linker_Options in the Ada > source files or put the linker options in the gnatmake command _after_ > the gnatmake option -largs. At least, as I understand it. Or, much better, create an externally-built library project, e.g. project Curses is for Externally_Built use "true"; for Source_Files use (); for Library_Dir use "/usr/lib"; -- For example for Library_Name use "ncurses"; for Library_Kind use "dynamic"; -- When linking to a shared library end Curses; and use it with your project. GNAT will do anything needed to link to the library. This includes adding messy prefixes like "lib" on Linux targets, choosing appropriate file type, *.dll, *.so, *.lib, *.a etc. Note also that this is transitive. If your project is itself a library project = may not have linker options by itself, a third project will nevertheless inherit linker options from Curses through it. [pragma Linker_Options is the worst of all three] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de