Dual platform (Windows/Linux) development lazarus / 3-General ---------------------------------------------------------------------- tech-pro · 2008-02-05 10:21 I am developing a program that has both Windows and Linux versions from the same source files. I was very impressed that my program developed first under Windows compiled immediately under Linux and worked. Of course, a few platform-specific changes are needed, that can be handled with $IFDEFS. For example, I have to find a Linux replacement for ShellExecute, to launch web pages in the user's browser. I really would like to have just a single set of source files, and not risk confusion by copying them to Linux to work there, and then copying back to Windows. I have read/write access from Linux to my Windows partition. Is it practical to compile under two platforms using the same physical copies of the source files? ---------------------------------------------------------------------- Marc · 2008-02-05 10:53 Thats how I develop lazarus. Sources are located on one fileserver and the same source is used for compiling win32/win64/wince/linux32/linux64/macosx ---------------------------------------------------------------------- Almindor · 2008-02-05 21:47 Having the sources on one "active" disk on which you work from both sides can be a bit troublesome if you don't set things right. Make sure you put your .ppu/.o files in platform specific output dirs otherwise you might get some odd errors out of fpc. (it might try to use a .ppu from different platform, although if that happens then it's a bug) Btw. if you use TProcess you can avoid stuff like ShellExecute altogether without the ugly ifdefs. ---------------------------------------------------------------------- pch · 2008-02-06 08:47 It is also easy to cross compile  from Linux for Windows by installing the available fpc package. Then all you need is a XP and/or Vista virtual machine for testing, no more multi boot required.