[fpc-pascal] Porting code from Windows D2007, missing Windows functions

Bo Berglund bo.berglund at gmail.com
Thu Jul 14 07:08:29 CEST 2016

I am porting a Delphi2007 utility from Windows to Linux (Raspbian
Jessie). It uses a unit I have downloaded from the web, which was said
to support FreePascal too.

But now I am getting a number of missing identifier errors as follows
Function calls:
- SetFilePointer
- GetFileTime
- FileTimeToLocalFileTime
- FileTimeToDosDateTime
- SetEndOfFile


It seems like these are defined in Windows and now in FPC they are

The uses clause of the unit has the following content:

{$ifdef MSWINDOWS}
  LibC, <== Error here, not found

It could not find LibC and when I asked on the Lazarus list I got a
reply to try Unix and/or BaseUnix instead. But this does not work so I
guess these functions are in another FPC unit somewhere.

What should I add to the uses clause in place of LibC to get it to
compile on Linux?

I am using FPC 3.0 and Lazarus 1.6 on a Raspberry Pi3 with Raspbian

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list