[Lazarus] Using Laz 32bits to compile 64bits
Marcos Douglas
md at delfire.net
Fri Aug 19 21:54:03 CEST 2011
On Fri, Aug 19, 2011 at 5:25 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> Marcos Douglas schrieb:
>
>> My questions are:
>> 1. I can use Lazarus 32bits in a machine 64bits but compile a program to
>> 64bits?
>> 2. The make, to compile FPC, knows about if the machine is 64bits or I
>> have to type a parameter?
>
> I encountered many problems, in compiling 64 bit applications on a 64 bit
> Windows. One problem is the bad guess of fpc.exe, to build for 32 bit by
> default. More problems result from the tools in the fpc/bin directory, whose
> 32 and 64 bit versions have the same name. This discourages to have the
> fpc/bin directory in the PATH, in contrast to the default FPC/Lazarus
> installation. Finally the debugger seems to have problems with 32 and 64 bit
> applications (this may have changed in the meantime).
>
> For building FPC I replace the PATH entirely by the appropriate fpc/bin
> directory, which contains all required tools (what is not guaranteed by the
> standard installation). It may be a good idea to have isolated accounts,
> containing the 32/64 bit installations of FPC and Lazarus.
I never used PATH to compile or use them.
First I'm trying to compile FPC in a Win7 64bits.
I use this script[1] to compile FPC 32bit with success.
So, I changed the script to:
set myVERSION=2.7.1
set myROOT=c:\freepascal
set myFPC=%myROOT%\compiler\%myVERSION%
set myBINUTILS=%myROOT%\binutils
set PATH=%myBINUTILS%\x86_64-win64;%myFPC%\bin\i386-win32
cd %myFPC%
make clean all install OS_TARGET=win64 CPU_TARGET=x86_64
INSTALL_PREFIX=%myFPC% PP=%myBINUTILS%\ppc386.exe
DATA2INC=%myFPC%\utils\data2inc.exe
As you can see, I only includes: OS_TARGET=win64 CPU_TARGET=x86_64 parameters.
Question:
I can compile a new fpc.exe to 64bit using a ppc386.exe 32bit version,
on a machine 64bit?
[1] http://wiki.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29
Marcos Douglas
Marcos Douglas
More information about the Lazarus
mailing list