[Gambas-user] Creating a library....
Demosthenes Koptsis
demosthenesk at gmail.com
Sun Jun 10 20:47:01 CEST 2018
ok!
the Main module file should i keep it? Or remove it?
Now i just keep it for testing the gbLibc module with external functions.
The final lib should have a Main module?
On 06/10/2018 09:35 PM, Jussi Lahtinen wrote:
> You can export modules also (they really are classes).
>
>
> Jussi
>
> On Sun, Jun 10, 2018 at 9:29 PM, Demosthenes Koptsis
> <demosthenesk at gmail.com <mailto:demosthenesk at gmail.com>> wrote:
>
> EXPORT
>
> This keyword, when placed alone at the beginning of a class file
> declares the class as/exported/.
>
> i use a Module not a Class file.
> Should i use a class?
>
>
>
> On 06/10/2018 09:24 PM, Christof Thalhofer wrote:
>> Am 10.06.2018 um 17:10 schrieb Demosthenes Koptsis:
>>> Hello, i want to port to gambas the libc library, so i decided to create
>>> a library project.
>>>
>>> i have some questions...
>>>
>>> 1) First i created a new project as a command line project
>>>
>>> 2) i added a module file for all Public Extern functions, named gbLibc
>>>
>>> 3) i have also a Main module for testing purposes.
>>>
>>> i want to ask when a choose from project properties "Library" as project
>>> type, i need the Main module?
>> No.
>>
>>> Or before i compile the project i need to remove the Main module and
>>> have only the gbLibc module?
>>>
>>> How i must setup the project to create a library?
>> Flag the project as library and give it a vendor name.
>>
>> Every class or module that has to bee seen from outside (in other
>> projects) must contain the word "Export" in the beginning.
>>
>> Only public methods can be used in other projects.
>>
>> If it is compiled, the IDE will install it locally in the dir
>>
>> ~/.local/share/gambas3/lib/vendorname
>>
>> From now on you can see it in the library tab of the project dialog of
>> other projects.
>>
>> In other projects that will rely on the lib every exported class or
>> module will be seen and can be accessed as
>>
>> Classname.PublicMethod(...)
>>
>> If cou create an installation package for a Linux distro then the
>> library will be installed in
>>
>> /usr/lib/gambas3/vendorname
>>
>> Alles Gute
>>
>> Christof Thalhofer
>>
>>
>>
>> ----[ Gambas mailing-list is hosted byhttps://www.hostsharing.net ]----
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
> ]----
>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180610/3e53e567/attachment.html>
More information about the User
mailing list