[lazarus] cross compile

LeVA leva at az.isten.hu
Fri Dec 12 12:56:08 EST 2003


Hello!

Previously I posted a question about compiling a project to win32. Now I 
have read the howto on lazarus-ccr.sourceforge.net, and tried to do what 
it says. I have download those xmingw32 files, and tried to make them. 
It downloaded binutils and gcc3, and tried to compile it. The compile 
failed (as I expected), and now I'm here with no idea what to do. On 
that page someone wrote, that there is "A complete set of crosstools for 
linux is available on the FPC ftp site. Directory 
/pub/fpc/contrib/cross/mingw32 ftp://freepascal.stack.nl"
I have downloaded that mingwcross.zip file from there. It contains some 
dirs. Under my platform's directory (mingwcross.zip/i686-linux) there 
are three exe files:
i686-linux-ar.exe  i686-linux-as.exe  i686-linux-ld.exe

What should I do with these executables?
Are they useful for me?

So my compilation failed, but still want to make projects to win32. Is 
there another way/howto of doing this, or if the above compilation 
fails, I have no chance to make it? I have set up lazarus (Run / Compile 
Options / Code / Target OS -> Win32) to compile win32 executables, and 
changed the LCL widget type to win32. Now If I compile my project, I get 
this in the Messages window:
project1.lpr(6,13) Fatal: Can't find unit INTERFACES

The project1.lpr file contains this:

--------###--------

program Project1;

{$mode objfpc}{$H+}

uses
   Interfaces,
   Forms, unit1;

begin
   Application.Initialize;
   Application.CreateForm(TForm1, Form1);
   Application.Run;
end.

--------###--------

I have also downloaded the win32 unit files from
ftp://ftp.freepascal.org/pub/fpc/snapshot/v10/win32-i386/
Now they are in $(PREFIX)/lib/fpc/1.0.10/units/win32, and my fpc.cfg 
conatins these lines:
....
-Fu/home/leva/FreePascal/lib/fpc/1.0.10/units/$target
-Fu/home/leva/FreePascal/lib/fpc/1.0.10/units/$target/*
-Fu/home/leva/FreePascal/lib/fpc/1.0.10/units/$target/rtl
....

Is that "Can't find unit INTERFACES" message means, that despite of the 
above settings in the fpc.cfg, lazarus still can not find the win32 
units, or it means that I have to download some other units?

I hope that there is a way to do this cross compiling thing, and I can 
manage to create win32 apps under linux.

Thanks for the help!

Daniel


-- 
LeVA







More information about the Lazarus mailing list