Hi,
AddLibrary('libbla.pp') creates under Linux "blalib.so". I want "bla.so".
How to do that?
Mattias

Mailing lists / fpc-pascal / 2020-08
8 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
AddLibrary('libbla.pp') creates under Linux "blalib.so". I want "bla.so".
How to do that?
Mattias
AddLibrary('libbla.pp').SetExeName('bla');Michael.
On Sun, 30 Aug 2020 13:38:12 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
Creates "bla", not "bla.so".
Mattias
I had a look at the code, it indeed cuts off the extension. That does not seem logical.
Maybe we need to add OutputFileName : string which simply sets the -o option, SetExeName() can then just set OutputFileName.
Michael.
On Sun, 30 Aug 2020 14:16:14 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
Is there a workaround for fpc 3.2.0?
Mattias
Yes:
AddLibrary('libbla.pp').Options.Add('-obla.so')
Michael.
How?
Mattias
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.