Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2025-09

Missing functions ?

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi,
I recently installed Lazarus on my kubuntu 24.04 system. I installed it via fpcupdeluxe.
Working on my application I wanted to use some file-utilities. It seems they are not present. I wanted to use ExtractFileNameOnly, so I included the FileUtil unit (following the wiki-page :
https://wiki.freepascal.org/fileutil). But when I compile or build, I get an error :
frmmain.pas(72,13) Error: Identifier not found "ExtractFilenameOnly" Where should that function be located ? I grepped and I found some files that contain the function-declaration :
./fpcsrc/packages/fcl-passrc/src/pscanner.pp:Function ExtractFilenameOnly(Const AFileName : String) : String; ./fpcsrc/packages/fcl-passrc/src/pscanner.pp:Function ExtractFilenameOnly(Const AFileName : String) : String; ./fpcsrc/packages/pastojs/src/pas2jsfileutils.pp:function ExtractFilenameOnly(const aFilename: string): string; ./fpcsrc/packages/pastojs/src/pas2jsfileutils.pp:function ExtractFilenameOnly(const aFilename: string): string;

That's so for the gtk2, qt5 and qt6 versions of fpcupdeluxe. Any help ?
TIA,
Koenraad

Reply by email

Unknown author
to Unknown author

Op 23/09/2025 om 13:22 schreef Koenraad Lelong via lazarus:

Hi,

...

the FileUtil unit (following the wiki-page : https:// wiki.freepascal.org/fileutil). But when I compile or build, I get an error :

...I also added the requirement "LazUtils" should anyone wonder.

Reply by email

n7800
to Unknown author

The "ExtractFileNameOnly" function is in the "LazFileUtils" unit. ?
Yes, this unit is in the "LazUtils" package, and requires a dependency. ?
You searched the compiler files (RTL), but this package is in Lazarus. ?

Show quoted text 14 lines
???????, 23 ???????? 2025, 16:29 +05:00 ?? Koenraad Lelong via lazarus < >: ? Op 23/09/2025 om 13:22 schreef Koenraad Lelong via lazarus: > Hi, ... > the FileUtil unit (following the wiki-page : https:// > wiki.freepascal.org/fileutil). But when I compile or build, I get an > error : ...I also added the requirement "LazUtils" should anyone wonder. -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20250923/24b5f2dc/attachment.htm>

Reply by email

Unknown author
to n7800

Op 23/09/2025 om 13:39 schreef n7800 via lazarus:

The "ExtractFileNameOnly" function is in the "LazFileUtils" unit. Yes, this unit is in the "LazUtils" package, and requires a dependency. You searched the compiler files (RTL), but this package is in Lazarus.

Well, fpcupdeluxe creates a whole directorystructure for lazarus/fpc. I searched in the root of that directory so fpc AND lazarus sources/packages/etc.
But grep is case-sensitive, so I missed some instances. When grepping case-insensitive, I got more files that contain a function-definition : ./lazarus/components/lazutils/lazfileutils.pas:function ExtractFileNameOnly(const AFilename: string): string;

From your reply I deduced I should add LazFileUtils and I did. Now my project compiles. I also removed FileUtil, and it still compiles. So the wiki is not entirely accurate.

Thanks.

Koenraad

Reply by email

n7800
to n7800: The "ExtractFileNameOnly" function is in the "LazFileUtils" unit. ? Yes, this unit is in…

For quick function searches, I highly recommend installing the "Cody" package in IDE.

It's installed by default, and you can right-click on an unfound identifier and select "Source > Show Unit/Identifier Dictionary". It will immediately show the units in which the function is located, and you can add the unit to the "uses" section with one click and even add a dependency to the desired package. ?
For more details, see this article (it's a bit outdated): https://wiki.freepascal.org/Cody#Unit_/_Identifier_Dictionary ? ?

Show quoted text 27 lines
???????, 23 ???????? 2025, 16:39 +05:00 ?? n7800 via lazarus < >: ? The "ExtractFileNameOnly" function is in the "LazFileUtils" unit. ? Yes, this unit is in the "LazUtils" package, and requires a dependency. ? You searched the compiler files (RTL), but this package is in Lazarus. ? >???????, 23 ???????? 2025, 16:29 +05:00 ?? Koenraad Lelong via lazarus < >: >? >Op 23/09/2025 om 13:22 schreef Koenraad Lelong via lazarus: >> Hi, >... >> the FileUtil unit (following the wiki-page : https:// >> wiki.freepascal.org/fileutil). But when I compile or build, I get an >> error : >...I also added the requirement "LazUtils" should anyone wonder. >-- >_______________________________________________ >lazarus mailing list > >https://lists.lazarus-ide.org/listinfo/lazarus ? -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20250923/526bec59/attachment-0001.htm>

Reply by email

Matthieu Giroux
to Unknown author: I recently installed Lazarus on my kubuntu 24.04 system. I installed it via fpcupdeluxe.…

Hello !
ExtractFileNameOnly is included in Extended Packages in fonctions system unit. Here :XML Frames BPM VRAD Lazarus - Browse

|
|
| |
XML Frames BPM VRAD Lazarus - Browse

BPM from EADS W4 Express BPM Engine
|

|

|

Thanks for sharing. It is under GNU GPL lincense ! Matthieu Giroux 13 Rue Fr Tanguy PRIGENT A.15 - 35000 RennesT?l : 09 61 37 01 82 - 06 44 733 008 http://www.liberlog.fr

Le mardi 23 septembre 2025 ? 13:22:21 UTC+2, Koenraad Lelong via lazarus a ?crit :

Hi,
I recently installed Lazarus on my kubuntu 24.04 system. I installed it via fpcupdeluxe.
Working on my application I wanted to use some file-utilities. It seems they are not present. I wanted to use ExtractFileNameOnly, so I included the FileUtil unit (following the wiki-page :
https://wiki.freepascal.org/fileutil). But when I compile or build, I get an error :
frmmain.pas(72,13) Error: Identifier not found "ExtractFilenameOnly" Where should that function be located ? I grepped and I found some files that contain the function-declaration :
./fpcsrc/packages/fcl-passrc/src/pscanner.pp:Function ExtractFilenameOnly(Const AFileName : String) : String; ./fpcsrc/packages/fcl-passrc/src/pscanner.pp:Function ExtractFilenameOnly(Const AFileName : String) : String; ./fpcsrc/packages/pastojs/src/pas2jsfileutils.pp:function ExtractFilenameOnly(const aFilename: string): string; ./fpcsrc/packages/pastojs/src/pas2jsfileutils.pp:function ExtractFilenameOnly(const aFilename: string): string;

That's so for the gtk2, qt5 and qt6 versions of fpcupdeluxe. Any help ?
TIA,
Koenraad

Reply by email