Recent

Author Topic: [Solved] How to set up project with multiple cross compilers?  (Read 4290 times)

Pascal

  • Hero Member
  • *****
  • Posts: 886
[Solved] How to set up project with multiple cross compilers?
« on: October 17, 2018, 01:25:04 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?
« Last Edit: October 17, 2018, 08:48:03 pm by Pascal »
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

heejit

  • Full Member
  • ***
  • Posts: 245
Re: How to set up project with multiple cross compilers?
« Reply #1 on: October 17, 2018, 03:24:22 pm »
It is very easy with fpcupdeluxe

https://github.com/newpascal/fpcupdeluxe/releases

I am using it to crosscomplie from Linux -> Win64

Pascal

  • Hero Member
  • *****
  • Posts: 886
Re: How to set up project with multiple cross compilers?
« Reply #2 on: October 17, 2018, 03:43:45 pm »
Sorry, that's not what i wanted to know.

How do i set up one Lazarus project with two build modes, where each mode uses a different compiler.
The compiler is set for all projects in the lazarus options atm.
« Last Edit: October 17, 2018, 03:45:21 pm by Pascal »
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

lucamar

  • Hero Member
  • *****
  • Posts: 2962
Re: How to set up project with multiple cross compilers?
« Reply #3 on: October 17, 2018, 04:17:01 pm »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

zeljko

  • Hero Member
  • *****
  • Posts: 1144
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to set up project with multiple cross compilers?
« Reply #4 on: October 17, 2018, 04:36:58 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

Pascal

  • Hero Member
  • *****
  • Posts: 886
Re: How to set up project with multiple cross compilers?
« Reply #5 on: October 17, 2018, 08:31:09 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

I know this! but all of this is done with the compiler set in Lazarus options.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

Pascal

  • Hero Member
  • *****
  • Posts: 886
Re: How to set up project with multiple cross compilers?
« Reply #6 on: October 17, 2018, 08:32:08 pm »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)

Right, thanks, that does the job! Stupid me %)
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

Pascal

  • Hero Member
  • *****
  • Posts: 886
Re: How to set up project with multiple cross compilers?
« Reply #7 on: October 17, 2018, 08:54:47 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

I know this! but all of this is done with the compiler set in Lazarus options.

You get this if the target does not match:
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1909)

ASBzone

  • Sr. Member
  • ****
  • Posts: 437
  • Automation leads to relaxation...
    • Free BrainWaveCC Console Utilities
Re: How to set up project with multiple cross compilers?
« Reply #8 on: November 11, 2018, 06:16:07 am »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)

Right, thanks, that does the job! Stupid me %)


It took me a while to find that there, but I've been loving it since I found it.

Now I can use:  "Run --> Compile Many Modes" to quickly generate x32 and x64 binaries

-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.11 r63516 / FPC v3.2.1-r45705 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2004 (Build 19041.388)
Other Systems: Windows 10 Pro x64, Version 2004 or greater

 

TinyPortal © 2005-2018