[fpc-pascal] Shared libries

noreply at z505.com noreply at z505.com
Mon Dec 12 22:17:34 CET 2011


>
>>
>>
>> Well maybe ExportAll compiler feature should be suggested?
>>
>> But please try this
>>
>> unit Unit1;
>>
>> {$mode objfpc}{$H+}
>>
>> interface
>>
>> procedure proc1; stdcall;
>> procedure proc2; stdcall;
>>
>> implementation
>>
>>
>> procedure proc1; stdcall;
>> begin
>>    writeln('hello');
>> end; exports proc1;
>>
>> procedure proc2; stdcall;
>> begin
>>    writeln('hello 2');
>> end; exports proc2;
>>
>>
>> end.
> I tried and it didn't seem to work, however perhaps it could be related
> to that I'm trying to create a library for arm-linux on android.


Try adding EXPORT keyword after the stdcall.

I forgot to put that in there, that's what i used, but I figured it was
not needed so I deleted it before I sent my message. I thought export
keyword was not used for exports..



More information about the fpc-pascal mailing list