Recent

Author Topic: Creating programs for windows (x64, x32) and Linux (x64, x32) in Windows, how?  (Read 7269 times)

Человек_Борща

  • New Member
  • *
  • Posts: 33
    • My little IT world.
hello all!

I downloaded and installed lazarus-0.9.30-fpc-2.4.2-win32.exe

In the project options, as "Targer OS" I pointed Linux.
But the compiler told that he could not build the program for this system.

I want to write a program in Windows system for Windows (32 and 64 bit) and Linux (64 and 32 bit) what I need to download and install?

How with Lazarus create programs in windows, for windows (64,32 bit) and Linux (64,32 bit)?

P.S. //Forgive me for my poor english
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
One good solution is installing VirtualPC or a similar virtual machine application (there is a list of virtual machines in wikipedia). Then create 3 virtual machines, one for Windows 64-bits, one for Linux 32-bits and another for Linux 64-bits. Install Lazarus in all of them. Compile your application in each of them. You can also use the virtual machines for testing.

You can use cross-compiling to do all compilation parts from one computer, but you still need to test. so it does not exclude the need to have virtual machines for all targets. More info on cross-compiling: http://wiki.lazarus.freepascal.org/Cross_compiling

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Cross compilation doesn't work out of the box with standard distribution, it's supported but you have to build/get the cross compilation tools yourself. If you want something out of the box, try CodeTyphon distribution.

tatamata

  • Hero Member
  • *****
  • Posts: 804
    • ZMSQL - SQL enhanced in-memory database
hello all!

I downloaded and installed lazarus-0.9.30-fpc-2.4.2-win32.exe

In the project options, as "Targer OS" I pointed Linux.
But the compiler told that he could not build the program for this system.

I want to write a program in Windows system for Windows (32 and 64 bit) and Linux (64 and 32 bit) what I need to download and install?

How with Lazarus create programs in windows, for windows (64,32 bit) and Linux (64,32 bit)?

P.S. //Forgive me for my poor english
Čelovek,

Honestly, either use virtual systems or rather try to develop in Linux for both Linux and Windows. Only for Linux there is out of box solution (with .deb installation files) for cross-compiling...
Personally, I use debs for installing cross-compiling fpc on Puppy Linux and it works, I can easily produce Windows binaries in Puppy Linux.

Человек_Борща

  • New Member
  • *
  • Posts: 33
    • My little IT world.
So I need a virtual machine (like VirtualBox), install the operating system interesting me, and then in this system, download and install a suitable package of Lazarus. Next, I need to simply copy the source code to the system and compile it there the package of Lazarus.

Leledumbo, thank you!
I will try CodeTyphon;)
I think, this solution is much simpler than the virtual machine with interesting me OS.
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12838
  • FPC developer.

How with Lazarus create programs in windows, for windows (64,32 bit) and Linux (64,32 bit)?

First learn Linux, then start optimizing the repetition of generating binaries using crosscompiling.

Crosscompiling is not an excuse not to install your target platforms, that is simply going to fail miserably, since you can't deal with crosscompiling and new platforms in one step.

 

TinyPortal © 2005-2018