#1 2022-10-30 18:35:42

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Can not compile with fileinfo in FPC/Linux

Enabling Define FPCUSEVERSIONINFO in mormot.defines.inc causes problem in compilation with FPC and Linux x86 as target

mormot.core.os.posix.inc(31,9) Error: Duplicate identifier "FileInfo"

The problem might be that there is a function also named Fileinfo as the pascal unit.

Offline

#2 2022-11-02 20:27:49

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: Can not compile with fileinfo in FPC/Linux

Example httpServerRaw with FPCUSEVERSIONINFO  enabled in FPC 3.2

Verbose: Compiling C:\delphi\G\mORMot2\src\app\mormot.app.console.pas
Verbose: Compiling C:\delphi\G\mORMot2\src\core\mormot.core.base.pas
Verbose: Compiling C:\delphi\G\mORMot2\src\core\mormot.core.os.pas
mormot.core.os.posix.inc(31,9) Error: Duplicate identifier "FileInfo"
mormot.core.os.posix.inc(31,9) Hint: Identifier already defined in mormot.core.os.pas at line 2602
mormot.core.os.pas(8357,0) Verbose: There were 1 errors compiling module, stopping

Offline

#3 2022-11-03 15:31:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Can not compile with fileinfo in FPC/Linux

You are right.

Should be fixed by https://github.com/synopse/mORMot2/commit/98967911

Offline

#4 2022-11-04 14:42:23

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: Can not compile with fileinfo in FPC/Linux

Yes, thanks a lot @ab!

Offline

Board footer

Powered by FluxBB