mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 23:21:57 +02:00
* strip the '.dll' extension from the library names before adding them to the
NewExe imported name table git-svn-id: trunk@42614 -
This commit is contained in:
parent
deefeb1ca0
commit
dd9c76eeec
@ -614,6 +614,8 @@ interface
|
||||
constructor create(info: pasminfo; smart:boolean);override;
|
||||
end;
|
||||
|
||||
function StripDllExt(const DllName:TSymStr):TSymStr;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -4024,7 +4026,7 @@ cleanup:
|
||||
begin
|
||||
if not LibNameAdded then
|
||||
begin
|
||||
ImportedNameTable.AddImportedName(ImportLibrary.Name);
|
||||
ImportedNameTable.AddImportedName(StripDllExt(ImportLibrary.Name));
|
||||
LibNameAdded:=True;
|
||||
end;
|
||||
if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then
|
||||
@ -4201,6 +4203,18 @@ cleanup:
|
||||
CInternalAr:=TOmfLibObjectWriter;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
Procedures and functions
|
||||
*****************************************************************************}
|
||||
|
||||
function StripDllExt(const DllName:TSymStr):TSymStr;
|
||||
begin
|
||||
if UpCase(ExtractFileExt(DllName))='.DLL' then
|
||||
Result:=Copy(DllName,1,Length(DllName)-4)
|
||||
else
|
||||
Result:=DllName;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
Initialize
|
||||
*****************************************************************************}
|
||||
|
Loading…
Reference in New Issue
Block a user