× CodeTyphon Linux OS Development, discussions and problems

Question cross-compilation configuration

  • Libaud
  • Libaud's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
2 years 11 months ago #11030 by Libaud
cross-compilation configuration was created by Libaud

The cross-compilation capacity of CT is very very interesting but be careful with the configuration of FPC, Typhon and the Widget.

I've made some research on to cross-compile the same project with multi-target widget (x86/x64 + QT4/5 or GTK).

The first problem I was confronted with the last release of CT is the configuration of fpc.cfg.
Because directory inclusion is not correct for my own system. I'm on Linux Mint 18.2 x64. And I use by default the gcc/g++ 7 stable release.
Compilation of FPC, typhon64/32 working correctly but fpc.cfg was not configured exactly as needed for cross compilation. It's the same with release 6 or 5 of gcc/g++. So be careful with your own configuration of gcc/g++. And check installation, the default release...

So I've configured the search libraries with that on fpc.cfg :


and for have a correct cross-compilation for linux x86 :

# binutils prefix for cross compiling
#IFDEF cpui386

Note that I've remove the -XP$fpctarget- that it wasn't useful for me.

At start I said that I've made some tests for QT4/5 and GTK3 compilation/cross-compilation, because some projects of mind need that. I have saw that for CodeTyphon project (*.ctpr) it's not possible to have multi-widget configuration (QT4/5+GTK).
The best way is to a multi-project with a dedicated project for a specific widget add main.pas and other in all projects after. There's no difficulties with Windows target.

Frédéric Libaud, Digital Expert

Please Log in or Create an account to join the conversation.