Hi,

I followed the instructions on the Wiki to create a cross-compiler for
Windows.

  http://wiki.lazarus.freepascal.org/Cross_compiling#To_Windows

My current system is Ubuntu 64bit with FPC 64bit. I'm cross-compiling my
projects to Win32 from inside the IDE.

I have managed to successfully cross-compile my projects, but the
process is definitely not simple or quick. Is there some better way of
doing this from inside the IDE?

Currently I have to following these steps:

1)  Manually created a cross-compile script for fpGUI Toolkit, because
Lazarus Packages don't seem to support different files for various
platforms. So I have two .lpk files for Lazarus. One for Linux and one
for Windows.

2)  Due to the above problem, I can't include the fpgui_toolkit.lpk
packages as a dependency to my project when I cross-compile. So I have
to remove the dependency first (By thew trunk Lazarus crashes with AV
when I remove it. On restarting the IDE, I can remove it successfully).

3) Environment Options: Change Compiler path and FPC Source Path.

4) In my Project Compiler Options dialog, go to Code tab and change
target platform and CPU to 'Windows 32' and 'i386'. Remember, by current
setup is Linux with 64bit FPC.

5) Then due to issue (1), I have to manually add a -Fu<path> in the
Project Compiler Options dialog - Other tab.

6) If fpGUI code changed, manually run the cross-compile scrip.

7) Click Compile in Lazarus.


Finally I have a Windows 32bit executable.

Now if I want to continue with Linux + 64bit development in my project,
I have to undo all the steps above before I can recompile. This process
is extremely tedious.

Is there ANY better or faster way of doing this?  My next step is to
simply create a cross-compile script for my project as this will be MUCH
quicker that the process above.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to