Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

Configure Debugger and project for cross-compilati 8 years 10 months ago #8865

  • Marcelo
  • Marcelo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
First of all, Happy New Year!
I know many are in times of parties and celebrations and/or on vacation, so I do not expect an answer soon.
Not sure if this is the most appropriate forum in which to open this thread, I beg your pardon if I'm wrong.

I have a system to develop for Windows and Linux. I currently have not had the opportunity to perform compilation as for other platforms.

And looking documentation I have come to see a video:


It does look pretty simple when it is from Windows to Linux.
But this brought me more questions ... What if I need to compile for both OS: Windows and Linux? How should proceed? Is it possible to establish more than one OS Tarjet? What if I need to compile for 32bit and 64bit?
What should I to configure in both the debugger and the project?

Currently I own use CodeTyphon 5.5 and Windows 8.1 to work. Mi notebook is 64bits. I have pending install any distro of Linux, possibly Manjaro which is what one of my clients most important used.
CT install me Lazarus in 32bit and 64bit, and as I have understood I use each to proceed to compile the same project to generate executable on 32bit and 64bit respectively. Currently I use only the Typhon64.

I recognize that being a multiplatform certain things I care program. My intention is to follow the guidance that is in the wiki itself:
wiki.freepascal.org/Multiplatform_Programming_Guide

But not if I am a fool or gross to find documentation on how to properly configure everything to work on a project for multiplatform. For now, at least I've configured the debugger and the project following the recommendations given for Windows:
wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Win_64_bit
wiki.lazarus.freepascal.org/Debugger_Setup

I understand that things are a little different in CT, and could be compiled for different OSes and architectures with few clicks.
I'm not really aware of how used properly CT Studio. I see in the CrossBuild menu -> Builder ToollsChain the possibility of building ¿FPC? for different OSes and architectures. But in Status -> toolchain include 16 options. Between them and that I find interesting:
win32-i386-linux
win32-x86_64-linux
win64-i386-linux
win64-x86_64-linux

Status appears in it is disabled "Cross toolchain Engine" option Should I enable it first? How I do? I would like, if possible if there is someone with some time to give me some guidance, and if not too good to abuse the trust of some sound advice based on their experiences.

Best Regards,
PS: Sorry for my poor english.

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

Last edit: by Marcelo. Reason: Correct version of CT and SO

Configure Debugger and project for cross-compilati 8 years 10 months ago #8866

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
-First of all install CT 5.60 latest stable and if you want Update to Lab CT 5.70
-Forget anything you read out of these Site, CodeTyphon it's a REAL Cross-Build Programming Studio

-For make cross build project you must have info ,
A- ToolsChain from HostsOS to TargetOS ("Coffee")
B- TargetOS libraries ("Water")
C- FreePascal Cross-build Element from HostsOS to TargetOS ("Sugar")

Cross-build Engine build the "coffee" with help from binutils and gcc info1 info2
we provide prebuild "coffees" ready for use
so in most cases you don't have to build ToolsChain from HostsOS to TargetOS ("coffee"), just download with CTC->Download Toolchains

The "Water" (only if your target OS is Unix OS), are libraries from target OS, used from Freepascal cross-compiler "sugar", to build your cross application

The "sugar" is the Freepascal cross-compiler and units to build you cross application, you must build this

The "methodology" is the same with this or this
1)-Download (or build) ToolsChain from HostsOS to TargetOS ("Coffee")
2)-Download TargetOS libraries ("Water")
3)-Build FreePascal Cross-build Element from HostsOS to TargetOS ("Sugar")

4)-Configure and build your project
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Marcelo

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

Last edit: by Sternas Stefanos.

Configure Debugger and project for cross-compilati 8 years 10 months ago #8867

  • Marcelo
  • Marcelo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Eternal Stefanos thank you very much, I'm going to start studying all the material you have contributed.
A quick view understand some things, and other assimilating both have to go.

From what I'm understanding, the project is allowed to configure a one Tarjet.
If I need to make my system run on Windows and Linux, to what I'm understanding is that in the case of Windows do not need anything, and I generated default executable for this OS. But when generating the executable for Linux there if you have to configure everything as you indicate to me the steps you describe.
Does this have to do it every time I compile and as I develop, expand and improve my system and need to test how it works in both OS? That is, I'll have to compile to Windows, and then reconfigure the project to cross-compile it for Linux? This is what worries me most.

Regards,
PS: Sorry my poor English

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

Last edit: by Marcelo. Reason: correct errors in text

Configure Debugger and project for cross-compilati 8 years 10 months ago #8868

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
NO
Every Project has "Modes"
Every Project-Mode can have other "Compiler Options"



you can use Project-Modes for cross-build
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Marcelo

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

Last edit: by Sternas Stefanos.

Configure Debugger and project for cross-compilati 8 years 10 months ago #8871

  • Marcelo
  • Marcelo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Thanks Sternas for helping me.
Go to have a lot to learn! The cross compilation is very new to me. I have time to go uniting and implement concepts I'll try this.
If I come new questions arise here. Which it is most likely.

Best Regards,
PS: Sorry my poor English

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

Configure Debugger and project for cross-compilati 8 years 10 months ago #8948

  • Marcelo
  • Marcelo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
I'm back, after taking a while to get to read about build mode.
Let me see if I already understood:
I define two build modes, one for each OS. Then I setup for each mode the Tarjet, dir, etc.

Then when I want for example compile and build for Linux simply select the "Linux mode" (by giving a hypothetical name) and then pressed Run and / or Build. And the procedure analogous to the case of "Windows mode".

I am considering the possibility of 4 modes:
  • Windows debug mode
  • Linux debug mode
  • Windows release mode
  • Linux release mode
But maybe this is going too far. More than anything what I plan to prepare the final executable without debug information and not having a large executable.
What is recommended?

Best Regards,
PS1: Sorry the doble post. It did not seem right to edit the last message after so many days.
PS2: Sorry my poor English.

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

Configure Debugger and project for cross-compilati 8 years 10 months ago #8949

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
1)- when release your project, go to projects options and uncheck "Generate Debugger info for GDB"
or
2)-check option "Use external gdb debug symbols file (-Xg)", with this options your Project Executable will always for release
or
3)-Always "Code" you projects with "Debugger info" and "Strip" info , with CTCenter=>Strip tool

So many ways...

PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Marcelo

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

Last edit: by Sternas Stefanos.

Configure Debugger and project for cross-compilati 8 years 10 months ago #8950

  • Marcelo
  • Marcelo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Thanks Sternas,
I was already familiar with option 1, but I unknown the other 2 options.

I think with all the material you have given me and am able to get down to work.

Best Regards,
PS: Sorry my poor English.

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

  • Page:
  • 1