Re: Compilation without implementation source



"Jeffrey R. Carter" <spam.jrcarter.not@xxxxxxxxxxxxxx> writes:

Gene wrote:
For an educational exercise using GNAT and gnatmake, I need to hide
implementations of some modules from students in the simplest possible
way.

Is there a way to give them .ali, .ads, and .o files while withholding
the corresponding .adb, somehow telling gnatmake (and gnatbind) to
ignore the absence?

IIRC, if the .ali files are read-only, GNAT will not require the
source of the bodies. This may not work for generics or other cases
where the compilation has a dependency on the body, such as cross-unit
inlining.

This is pretty close to what gnatmake will do if you give it a
'library' gpr.

I haven't been able to get it to elaborate a static library with
unnecessary sources hidden - and I haven't tried dynamic libraries
yet. Others will know more.
.



Relevant Pages

  • Re: Question on setting up libraries
    ... that it will branch to it at execution time? ... roughly equivalent to shared libraries, ... It could well be that I've not specified the proper gnatmake options, ...
    (comp.lang.ada)
  • Using Functions of Executable
    ... I have got an executable generated with gnatmake. ... libraries and used during run-time. ... option i don't get any .lib file to link my Dll against. ...
    (comp.lang.ada)
  • Re: Gnat 3.15p @ win-2000 recompiles _all_ internal packages ...
    ... process ended up with the file timestamp being an hour out from the ... .ali timestamp. ... That allows me to fix bugs in the libraries when I find ... You can use GNAT Project for this sort of thing; ...
    (comp.lang.ada)
  • Re: Low cost TCP enabled devices
    ... Ali wrote: ... MAC+PHY *on chip*, all the libraries are free, and the prices start from ... 10$ for sampling quantities. ...
    (comp.arch.embedded)
  • Re: Multiple shared libraries with a single spec
    ... Niklas Holsti wrote: ... > Sorry for my misunderstanding. ... > making dynamically linked libraries. ... > directory as the .ali and .o. ...
    (comp.lang.ada)