Compile for Linux 64 on Delphi 10.4.2

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
Pizz
Posts: 2
Joined: Thu Jul 29, 2021 12:13 pm

Compile for Linux 64 on Delphi 10.4.2

Post by Pizz »

Hello,

We would like to carry our application on Linux 64 using Delphi 10.4.2 :mrgreen: . To do that we have to compile XLSReadWriterII 6 for it.

Do you support this compiler ? If, yes. What is the step ? Any define to set ?
To start we just need to read a XLSX file. Advance functionality is not needed.

Thank you in advance.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Compile for Linux 64 on Delphi 10.4.2

Post by larsa »

Hello

I don't have a Linux installation so I can't test this but I can't see any reason why it not should work. Compiling for Mac which is a unix variant works. You will of course need the source code. You will also need Linux object files for gzip.
Lars Arvidsson, Axolot Data
Pizz
Posts: 2
Joined: Thu Jul 29, 2021 12:13 pm

Re: Compile for Linux 64 on Delphi 10.4.2

Post by Pizz »

I suppose compiling on Mac is by using Lazarus compilers and, of course, will work as well on Linux.
Unfortunately in our case we cannot use the FPC compiler.

My issue is about Linux 64 Delphi compiler.



I progress a little bit on the subject. I hope you could provide me some help or information.

First of all, what is the meaning of "BABOON" flag ? :?:

By using LINUX, BABOON, AX_HAS_UITYPES, DELPHI_XE5_OR_LATER compilation flags and minor modifications of the source code, I manage to go ahead on compiling the library. But I'm stuck in unit "XLSZlibPas5" and in this case errors are not obvious to me.
Of course I've replaced gzip object files by Linux version of them (version 1.2.5).

I'm using the last version of the library : 6.01.08, Delphi 10.4 with the last version of Debian as Linux target machine. And Fresh new 1.2.5 gzip Linux object files.
Using a virtual machine is enough to add Linux SDK in a Windows Delphi development environment.


See my errors :

Code: Select all

  c:\program files (x86)\embarcadero\studio\21.0\bin\dcclinux64.exe -$O- --no-config -B -Q -AGenerics.Collections=System.Generics.Collections;
  Generics.Defaults=System.Generics.Defaults -DLINUX;BABOON;AX_HAS_UITYPES;DELPHI_XE5_OR_LATER;DEBUG -E.....
  -LN...
  -OC:\work\trunk\Common\External\XLSSuit4\Src;...; -VN 
  -NH...
[DCC Erreur] XLSZlibPas5.pas(325): E2009 Incompatible types: 'Calling conventions differ'
[DCC Erreur] XLSZlibPas5.pas(326): E2009 Incompatible types: 'Calling conventions differ'
[DCC Erreur] XLSZlibPas5.pas(338): E2003 Undeclared identifier: 'inflateInit_'
[DCC Erreur] XLSZlibPas5.pas(340): E2003 Undeclared identifier: 'inflate'
[DCC Erreur] XLSZlibPas5.pas(353): E2003 Undeclared identifier: 'inflateEnd'
[DCC Erreur] XLSZlibPas5.pas(382): E2003 Undeclared identifier: 'deflateInit_'
...
[DCC Erreur fatale] XLSReadWriteZIP5.pas(671): F2063 Could not compile used unit 'XLSZlibPas5.pas'
Do you have any idea why Linux Delphi 64 compiler is not happy ?

Thank you in advance for your response.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Compile for Linux 64 on Delphi 10.4.2

Post by larsa »

Hello

Delphi with FMX have supported OSX for many years.

You don't need the XLSZlibPas5.pas unit. It's used for some rare situations when Delphi's ZIP lib don't works. Just remove the unit. The gzip files is then not needed either.
Lars Arvidsson, Axolot Data
Post Reply