[lazarus] Developing win32 while in Linux

Marco van de Voort marcov at stack.nl
Sat Mar 22 08:24:00 EST 2003


> Okay, I remember hearing this was/is theoretically possible.
> 
> For some reason I just got a wild hair and wanted to see how much
> trouble it would be to convert my app to compile for either environment,
> so I've just added a bunch of $ifdef conditionals to separate out the OS
> specific code.
> 
> Can someone give me some tips on how to get my FPC / Lazarus ready for
> building Win32 apps?
> 
> All I get so far is "Can't find unit SYSWIN32" but I have
> /usr/src/fpc/rtl/win32/syswin32.pp on my hard drive...

- Install (or compile) cross win32-binutils (so binutils which work under Linux, but prepare
	binaries for win32)
- Install a matching RTL and libraries with the compiler in 
    /usr/local/lib/fpc/<version>/units/win32/ and below

Then, when compiling for win32 make sure that 

-FD/path/to/win32/bin/utils    
-Fu/usr/local/lib/fpc/<version>/units/win32/* 
-Twin32

in your ppc386.cfg/fpc.cfg/.ppc386.cfg/.fpc.cfg whatever you use.

(this means that you will have to swap .cfg files to compile between win32 and linux, e.g.
with symlinks)






More information about the Lazarus mailing list