Sign in Join

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

Mailing lists / lazarus / 2008-05

Cross-compile on Linux from 32bits to 64bits

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

TOUZEAU DAVID

Dear

I'm using a 32 bits Linux system to developp and i want my program to be 64 Bits compatible.
What is the best method to allow my program to be compatible on 32 And 64 bits ?

Besst regards

David Touzeau -------------------------- Linux Ubuntu 7.04 feisty FreePascal-Lazarus,perl,delphi,php artica for postfix management console (http://www.artica.fr) icq:160018849

Reply by email

Mattias Gaertner
to TOUZEAU DAVID
Show quoted text 7 lines
Dear I'm using a 32 bits Linux system to developp and i want my program to be 64 Bits compatible. What is the best method to allow my program to be compatible on 32 And 64 bits ?

See FPC mailing list: check pointer/integer type casts, use PtrInt and PtrUInt instead and avoid assembler.

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
> I'm using a 32 bits Linux system to developp and i want my program to > be 64 Bits compatible. > What is the best method to allow my program to be compatible on 32 And > 64 bits ? See FPC mailing list: check pointer/integer type casts, use PtrInt and PtrUInt instead and avoid assembler.

Also avoid legacy units like "oldlinux" and "libc" that are not supported outside of linux/i386

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 11 lines
On Sun, May 25, 2008 at 10:24:29AM +0200, Mattias Gaertner wrote: > > I'm using a 32 bits Linux system to developp and i want my > > program to be 64 Bits compatible. > > What is the best method to allow my program to be compatible on > > 32 And 64 bits ? > > See FPC mailing list: check pointer/integer type casts, use PtrInt > and PtrUInt instead and avoid assembler. Also avoid legacy units like "oldlinux" and "libc" that are not supported outside of linux/i386

Is there already a 32/64bit page/faq in the wiki?

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
> > > I'm using a 32 bits Linux system to developp and i want my > > > program to be 64 Bits compatible. > > > What is the best method to allow my program to be compatible on > > > 32 And 64 bits ? > > > > See FPC mailing list: check pointer/integer type casts, use PtrInt > > and PtrUInt instead and avoid assembler. > > Also avoid legacy units like "oldlinux" and "libc" that are not > supported outside of linux/i386 Is there already a 32/64bit page/faq in the wiki?

Not that I know. But I haven't searched.

IMHO unit libc should get some deprecated warnings in 2.3.x to avoid accidental use.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 18 lines
On Sun, May 25, 2008 at 01:13:36PM +0200, Mattias Gaertner wrote: > > > > I'm using a 32 bits Linux system to developp and i want my > > > > program to be 64 Bits compatible. > > > > What is the best method to allow my program to be compatible > > > > on 32 And 64 bits ? > > > > > > See FPC mailing list: check pointer/integer type casts, use > > > PtrInt and PtrUInt instead and avoid assembler. > > > > Also avoid legacy units like "oldlinux" and "libc" that are not > > supported outside of linux/i386 > > Is there already a 32/64bit page/faq in the wiki? Not that I know. But I haven't searched. IMHO unit libc should get some deprecated warnings in 2.3.x to avoid accidental use.

Now there is:
http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#32.2F64_bit

Mattias

Reply by email

Osvaldo TCF - Listas
to Mattias Gaertner

Is it possible?

Ubuntu 8.04.1
FPC 2.2.3
Lazarus r16930

What i need for do that, Cross-compile on Linux from 32bits to 64bits?

Compiler test
========================================================= /usr/bin/fpc -MObjFPC -Sgi -O1 -TLinux -Px86_64 -gl -WG -va -l -Fu../../../../../../usr/share/lazarus/lcl/units/x86_64-linux/ -Fu../../../../../../usr/share/lazarus/lcl/units/x86_64-linux/gtk2/ -Fu../../../../../../usr/share/lazarus/packager/units/x86_64-linux/ -Fu. -dLCL -dLCLgtk2 /tmp/testcompileroptions.pas
========================================================= problems, i do not have this:

/usr/share/lazarus/lcl/units/x86_64-linux/
/ust/share/lazarus/lcl/units/x86_64-linux/gtk2/
/usr/share/lazarus/packager/units/x86_64-linux/

================
WARNING: unit search path does not
exists: /usr/share/lazarus/lcl/units/x86_64-linux/ WARNING: unit search path does not
exists: /usr/share/lazarus/lcl/units/x86_64-linux/gtk2/ WARNING: unit search path does not
exists: /usr/share/lazarus/packager/units/x86_64-linux/ ERROR: compiled FPC unit not found: system.ppu
ERROR: compiled FPC unit not found: sysutils.ppu
ERROR: compiled FPC unit not found: classes.ppu
ERROR: compiled FPC unit not found: avl_tree.ppu
ERROR: compiled FPC unit not found: zstream.ppu
================

Mattias Gaertner wrote 30 lines
On Wed, 28 May 2008 22:57:42 +0200 Marco van de Voort wrote: > On Sun, May 25, 2008 at 01:13:36PM +0200, Mattias Gaertner wrote: > > > > > I'm using a 32 bits Linux system to developp and i want my > > > > > program to be 64 Bits compatible. > > > > > What is the best method to allow my program to be compatible > > > > > on 32 And 64 bits ? > > > > > > > > See FPC mailing list: check pointer/integer type casts, use > > > > PtrInt and PtrUInt instead and avoid assembler. > > > > > > Also avoid legacy units like "oldlinux" and "libc" that are not > > > supported outside of linux/i386 > > > > Is there already a 32/64bit page/faq in the wiki? > > Not that I know. But I haven't searched. > > IMHO unit libc should get some deprecated warnings in 2.3.x to avoid > accidental use. Now there is: http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#32.2F64_bit Mattias _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email