Recent

Author Topic: Compiling Project Both for 32bits and 64bits  (Read 6244 times)

DJerome

  • Newbie
  • Posts: 4
Compiling Project Both for 32bits and 64bits
« on: June 12, 2007, 09:23:40 am »
Hi,
I've  just installed lazarus on my fedora 7 64bits and work very well.
But how can i set lazarus to compile my projects with the 32bits and/or 64bits version of FPC ? Must I make 2 projects. For now just the 64bits version of FPC is installed

Thanks

DJerome

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
RE: Compiling Project Both for 32bits and 64bits
« Reply #1 on: July 06, 2007, 01:14:06 pm »
Currently the only way to make a cross-compile capable FPC/Lazarus you'd need to have:
1. fpc for 64 bits
2. fpc for 32 bits

Then get Lazarus from source and build it's LCL and packager for both 32 and 64 bits. You can specify CPU_TARGET=x86_32 for example.

This should enable you to switch fpc in environment options. If your 32 and 64bit fpc compiled units are in same dir, you should be able to use "fpc" instead of "ppcx64" or "ppc386" in environment options/compiler path and if everything is in place and visible by the compiler, switching between 64 and 32 bit output is just a matter of specifieing target in compiler options of your project.

I didn't test this tho, but one day will on my laptop :)

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Compiling Project Both for 32bits and 64bits
« Reply #2 on: July 06, 2007, 01:22:57 pm »
You already should have Lazarus from source (but its directories must be writable).

It is CPU_TARGET=i386 for 32 bits.

You can crosscompile the LCL from the IDE, if you have setup fpc correctly.

 

TinyPortal © 2005-2018