[fpc-pascal] GetEpochTime not found

Michael Van Canneyt michael at freepascal.org
Sat Dec 9 10:01:23 CET 2006



On Sat, 9 Dec 2006, Marc Santhoff wrote:

> Hi,
> 
> I've got some funny problem here. The program compiled well with fpc up
> to version 1.9.4. I haven't touched it for a while and now it fails with
> fpc 2.0.2.
> 
> The source snippet in queston is:
> 
> function TStorable.generateID: integer;
> begin
> //writeln(GetEpochTime); does not work anymore
> result := sysutils.GetEpochTime(); // does not work either
> //result := fpTime; // this works!
> end;
> 
> As you can see I've tried prefixing with the correct unit specifier but
> it fails:
> 
> CommonTypes.pp(207,21) Error: Identifier not found "GetEpochTime"
> 
> Checking the source and even grep'ping and strings'ing sysutils.ppu and
> sysutils.o the function GetEpochTime is there:
> 
> $ grep GetEpochTime /home/marc/fpc-2.0.2/lib/fpc/2.0.2/units/i386-freebsd/rtl/sysutils.ppu
> Binary file /home/marc/fpc-2.0.2/lib/fpc/2.0.2/units/i386-freebsd/rtl/sysutils.ppu matches
> 
> But the compiler doesn't find it:
> 
> from fpc ... -vt
> ...
> PPU Loading /home/marc/fpc-2.0.2/lib/fpc/2.0.2/units/i386-freebsd/rtl/sysutils.ppu
> ...
> 
> I'm stuck, what is missing here or how can I go on debugging the
> problem?

Nothing is missing. getepochtime is present in the Sysutils unit, but is not exposed,
as it's not cross platform. You should be using fptime.

Michael.



More information about the fpc-pascal mailing list