comp.lang.ada
 help / color / mirror / Atom feed
From: localhost@example.org
Subject: Re: Some questions on packaging Ada code
Date: Wed, 9 Mar 2011 11:36:10 +0000 (UTC)
Date: 2011-03-09T11:36:10+00:00	[thread overview]
Message-ID: <slrninephc.66u.localhost@example.org> (raw)
In-Reply-To: eddb7c64-bbfb-4a12-8742-8f452882e82d@f31g2000pri.googlegroups.com

> Yes.
>
> For the GNAT run-time library, pass the -static option to gnatbind,
> like so:
>
> gnatmake [other parameters...] -bargs -static

Oh great! I tried passing -static by itself but it was ignored. I missed the
-bargs part.

> Please read the GNAT User's Guide for your version of GCC[1].
>
> [1] http://gcc.gnu.org/onlinedocs/

I admit I have jumpinitis and didn't read the manuals thoroughly enough at
this point. 
>
> For libraries other than the GNAT run-time library (such as ncurses),
> simply specify the name of all static libraries necessary on the
> command line or in the package Linker of your project file, like so:
>
> gnatmake foo.adb [other options...] \
>   -bargs -static \
>   -largs /usr/lib/libncurses_ada.a /usr/lib/libncurses.a

I figured how to link the ncurses libs but got lucky on the fact ncurses
doesn't seem to generate a shared library (.so as I gather from Nasser's
reply) only the .a libs exist. This is great info I was hoping for.

> It is possible to cross-compile from a GNU/Linux host to a Windows
> target but I am not aware of any binary distribution of the necessary
> cross-compiler.  This means you would have to build your own cross-
> compiler and cross-libraries from source.  I think this would be more
> trouble than it is worth (especially since you seem to be a beginner);

Ok yeah that sounds like a bit much at this point ;)

> you would be better off installing a native compiler and libraries on
> Windows and recompiling your sources on Windows.

Sounds good.
>
> Finally, some notes about ncurses:
> * the library may not work out of the box on Windows as it needs an
> ANSI-compliant terminal.  I'm sure it can be made to work, perhaps
> with some tweaking.

Oh drat I didn't think about that. Maybe we can find one but really a
Windows version is much later because I have other issues.

> * you will need an Ada binding to ncurses, both on GNU/Linux and on
> Windows.  Do you have one?  (see also http://bugs.debian.org/615920).

Yes I've installed ncurses and got a few small samples written. I'm going to
try to actually do something worthwhile if I can now... 

>
> Hope this helps

Very much, thanks indeed!



      reply	other threads:[~2011-03-09 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 18:14 Some questions on packaging Ada code localhost
2011-03-08 20:53 ` Nasser M. Abbasi
2011-03-09 10:32   ` localhost
2011-03-09  0:19 ` R Tyler Croy
2011-03-09 10:33   ` localhost
2011-03-09 10:44     ` Nasser M. Abbasi
2011-03-09 11:29       ` localhost
2011-03-09 11:22 ` Ludovic Brenta
2011-03-09 11:36   ` localhost [this message]
replies disabled

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