[Gambas-user] Creating a library....

Christof Thalhofer chrisml at deganius.de
Mon Jun 11 13:53:15 CEST 2018


Am 10.06.2018 um 19:42 schrieb T Lee Davidson:
> As I understand it, for final deployment, you should not have a Main
> module _and_ a library module.  The Main module should be your
> library. For testing, create a new project that uses the compiled
> library.
> 
> http://gambaswiki.org/wiki/doc/library
> 
> For ease of development, you could of course use the two modules as
> you have done. Then for deployment, move the library module to the
> Main module and set the project type as Library.

Soory this is wrong.

It is very easy to test a library with a start class (aka "Main module")
from inside. You do not need a separate project for testing purposes.

There is no need for it but it doesn't harm, if there is a start class.

A library is a container for classes and methods that can be used in
different projects.

They are "blended in" by the interpreter in these projects. So, if you
call a class method from a testfunction inside the library project or
from outside is quite the same ...


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180611/8c2f86c7/attachment-0001.sig>


More information about the User mailing list