mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 05:25:58 +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;
|
constructor create(info: pasminfo; smart:boolean);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function StripDllExt(const DllName:TSymStr):TSymStr;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -4024,7 +4026,7 @@ cleanup:
|
|||||||
begin
|
begin
|
||||||
if not LibNameAdded then
|
if not LibNameAdded then
|
||||||
begin
|
begin
|
||||||
ImportedNameTable.AddImportedName(ImportLibrary.Name);
|
ImportedNameTable.AddImportedName(StripDllExt(ImportLibrary.Name));
|
||||||
LibNameAdded:=True;
|
LibNameAdded:=True;
|
||||||
end;
|
end;
|
||||||
if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then
|
if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then
|
||||||
@ -4201,6 +4203,18 @@ cleanup:
|
|||||||
CInternalAr:=TOmfLibObjectWriter;
|
CInternalAr:=TOmfLibObjectWriter;
|
||||||
end;
|
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
|
Initialize
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
Loading…
Reference in New Issue
Block a user