Basic StepsThere are a few common steps involved in crosscompiling that you must do in every case: 1.- Have already a FreePascal compiler for the platform you wish to compile from.
You need to have the FreePascal source code (except for the special case of having everything prepared by someone else).
You need to either build from source or obtain binaries of the cross-binutils that run on the platform you are on and are designed to build programs for your desired target platform.
Sometimes you will need some files from the target you are compiling to.
From WindowsWin32 To Win64If you are compiling the 2.1.1 or greater branch of fpc you can just do:$ make all OS_TARGET=win64 CPU_TARGET=x86_64and then$ make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
For what i have read, easiest solution is maybe to actually have the operating systems you are compiling to.
How would you test your applications?
Quote from: User137 on September 15, 2011, 06:09:57 pmFor what i have read, easiest solution is maybe to actually have the operating systems you are compiling to.Thank you, but that is exactly the solution I want to avoid.
What would be really sweet would be some ISO images of the different target platforms for VirtualBox, with pre-installed Lazarus
Porting Delphi code to Lazarus have been proved to be an exercise of pain and frustration. They are so close each other that seems an easy task but the "little" differences in the behaviour of Delphi and Lazarus components requires a long time to test the application looking for "bugs" and workarounds.
Can Lazarus made multiplatform application or it is just a myth?
Are this code in fpc source? Or I need something else?
Sometimes? What "sometimes" means here? what files?
Where? In FPC source directory? In C:\lazarus\fpc\2.4.2\source?
Must I install FPC sources there?
What directories must I have in the PATH?
And then, how to tell Lazarus to compile for each platform?I tried everything I see in Internet and nothing worked.
Is there any real step by step guide to do so? Where?
Quote from: CaptBill on September 15, 2011, 07:12:06 pmWhat would be really sweet would be some ISO images of the different target platforms for VirtualBox, with pre-installed Lazarus+1Very good idea...
Yes, of course. No, it's not a myth. If you want prepackaged solution, try CodeTyphon. I choose to build everything from source and maintain it myself, though
Try this.
I'm in the process to port a pair of Delphi applications to Lazarus to get really multiplatform applications.
Now I'm at the problematic part: CrosscompilingCan Lazarus made multiplatform application or it is just a myth?
Quote from: BigChimp on September 15, 2011, 07:27:58 pmQuote from: CaptBill on September 15, 2011, 07:12:06 pmWhat would be really sweet would be some ISO images of the different target platforms for VirtualBox, with pre-installed Lazarus+1Very good idea...If someone is interested I could create such VirtualBox images if there are enough requests...BTW I agree that setting up a crosscompiling environment is quite a painful experience I hope it'll work easier "from the box" some day...And concerning Delphi porting, it's nothing unusual that it can be very hard since many programs use WinAPI and some VCL intricacies. The funny thing is, it's not even the way Delphi apps should have been written! Correctly written apps are much easier to port. Another problem is use of Delphi/Windows only components, and for that there's generally no easy (if any) cure.
It is a "write once build anywhere" language. That means you can write your program from any platform., save and open the same files on another platform, and then compile on that platform.