[Lazarus] "Running" a library

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Fri Sep 14 21:34:38 CEST 2012


Juha Manninen wrote:
> On Fri, Sep 14, 2012 at 7:56 PM, Mark Morgan Lloyd
> <markMLl.lazarus at telemetry.co.uk> wrote:
>> Couldn't this be specified as the "Launching application" parameter?
> 
> Actually it is defined in Run -> Run Parameters ... -> Host application

I was thinking about the case where some sort of wrapper was needed to 
do something sensible with the library, e.g. to call a "magic number" 
function as a basic test of what interface it exposed.

>> I think a fair question is whether a library can be built in such a way that
>> it can also be started as a program, i.e. can be invoked in such a way as to
>> test its own basic functionality.
> 
> How to create an automatic test program for it?
> There are no general rules to do such thing.

No, I was wondering about the extent to which a library could be defined 
such that it was also runnable as a program.

> P.S.
> Not really related to this question but maybe 2 years ago Lazarus
> still allowed to "run" a library project.
> It was a bug, the library binary was treated like any program binary
> and it crashed of course.
> It is fixed now.

But /why/ did it crash? Can a library be written so that it doesn't 
crash if invoked as a program?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list