comp.lang.ada
 help / color / mirror / Atom feed
* Interface Units for Standalone Libraries and units with'ed by the body
@ 2017-02-26 17:35 Scott Loyd
  2017-02-26 19:22 ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Loyd @ 2017-02-26 17:35 UTC (permalink / raw)


I have created a standalone library which is called by other Ada code. The problem is that every time I 'with' a package into the body (not the spec!) of the standalone library, GNAT tells me the unit is not in the interface set for the library but is needed by the body. That's true, and why should I care? Callers should not need to have units needed explicitly by the implementation exposed as interface units, should they?

From http://www.cs.fsu.edu/~baker/ada/gnat/html/gnat_ugn_20.html#SEC226
"A Stand-alone Library (abbreviated "SAL") is a library that contains the necessary code to elaborate the Ada units that are included in the library. In contrast with an ordinary library, which consists of all sources, objects and `ALI' files of the library, a SAL may specify a restricted subset of compilation units to serve as a library interface. In this case, the fully self-sufficient set of files will normally consist of an objects archive, the sources of interface units' specs, and the `ALI' files of interface units. If an interface spec contains a generic unit or an inlined subprogram, the body's source must also be provided; if the units that must be provided in the source form depend on other units, the source and `ALI' files of those must also be provided."

I am not using generic units or inlined subprograms so what am I missing here?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-04 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-26 17:35 Interface Units for Standalone Libraries and units with'ed by the body Scott Loyd
2017-02-26 19:22 ` Simon Wright
2017-02-26 22:44   ` Scott Loyd
2017-02-27  8:27     ` Dmitry A. Kazakov
2017-03-04 15:15       ` Scott Loyd
2017-02-27 14:35     ` Simon Wright

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