comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Including C source in GNAT project for building library
Date: Thu, 24 Jan 2008 08:33:32 +0000
Date: 2008-01-24T08:33:32+00:00	[thread overview]
Message-ID: <m2odbbaahv.fsf@mac.com> (raw)
In-Reply-To: oHVlj.18222$ND3.12746@newsfet17.ams

Per Sandberg <per.sandberg@bredband.net> writes:

> The project file looks ok to me but gnatmake only accepts Ada so you
> need to use gprmake to use other languages.

Got it, thanks.

The next problem (may only be a Darwin thing) is that I was trying to
construct a static standalone library.

It looks as though a client gnatmake may manage to work out the
required elaboration but may not compute the library dependencies
right: eg, if the main program doesn't use tasking and neither do the
used parts of the library, things appear to work; but if the used
parts of the library use tasking, the binder leaves out libgnarl (I
only have .a, didn't build .dynlib).

I'm not even sure that elaboration is OK, because when I added -largs
-lgnarl it linked but I got a segv at runtime.

Workround: don't try to build a standalone static library! (ie, leave
out the Library_Interface attribute). This does mean copying the
source files to an include directory (can be the same as the object
directory).

Good to see the -p switch for {gnat,gpr}make (create required output
directories if needed).



  reply	other threads:[~2008-01-24  8:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24  5:27 Including C source in GNAT project for building library Simon Wright
2008-01-24  5:54 ` Per Sandberg
2008-01-24  8:33   ` Simon Wright [this message]
2008-01-24  6:05 ` Simon Wright
replies disabled

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