[fpc-pascal] fpmake addlibrary
Michael Van Canneyt
michael at freepascal.org
Sun Aug 30 23:38:30 CEST 2020
On Sun, 30 Aug 2020, Mattias Gaertner via fpc-pascal wrote:
> On Sun, 30 Aug 2020 16:22:58 +0200 (CEST)
> Michael Van Canneyt <michael at freepascal.org> wrote:
>
>> On Sun, 30 Aug 2020, Mattias Gaertner wrote:
>>
>> > On Sun, 30 Aug 2020 14:30:11 +0200 (CEST)
>> > Michael Van Canneyt <michael at freepascal.org> wrote:
>> >
>> >> [...]
>> >>> Is there a workaround for fpc 3.2.0?
>> >>
>> >> Yes:
>> >>
>> >> AddLibrary('libbla.pp').Options.Add('-obla.so')
>> >
>> > Do you mean:
>> >
>> > {$IFDEF Linux}
>> > AddLibrary('libbla.pp').Options.Add('-obla.so')
>> > {$ENDIF}
>>
>> Will be ok unless you want to crosscompile. In the latter case you
>> must check the installer targetOS.
>
> How?
var
T : TTarget;
P : TPackage;
begin
P:=Installer.AddPackage('yourgreatpackage');
T:=P.AddLibrary('libbla.pp');
if Defaults.OS=Linux then
T.Options.Add('-obla.so');
end;
Michael.
More information about the fpc-pascal
mailing list