How to make Linux platform available in existent console applications

The process of  migrating your existing console applications to the Linux platform (recently added with Delphi 10.2 Tokyo) begins adding the new “64-bit Linux” platform to the “Target Platforms” of your project.

Generally, everything goes smooth and you simply have to select “64-bit Linux” from the combobox in the “Select platform” dialog.

If you can’t find the entry in the list, maybe you are experiencing what happened to me today. After a quick check, it seems to me the problem was in the value of the “FrameworkType” node of the DPROJ file of the existent console app I was trying to compile for Linux.

Simply open the dproj file with a text editor and change the value of FrameworkType from “VCL” to “None” (that is the value you get if you create a new console application from scratch in Delphi 10.2 Tokyo) and the issue is fixed.

Old version (Linux not available in “Select platform” dialog):

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <PropertyGroup>
 <ProjectGuid>{1DC6AA1B-F403-45A2-B5E3-E2EB13E7BF9D}</ProjectGuid>
 <ProjectVersion>18.2</ProjectVersion>
 <FrameworkType>VCL</FrameworkType>
 <MainSource>Project1.dpr</MainSource>
(...)

 

New version (Linux available in “Select platform” dialog):

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <PropertyGroup>
 <ProjectGuid>{1DC6AA1B-F403-45A2-B5E3-E2EB13E7BF9D}</ProjectGuid>
 <ProjectVersion>18.2</ProjectVersion>
 <FrameworkType>None</FrameworkType>
 <MainSource>Project1.dpr</MainSource>
(...)

 

HTH!

 

Andrea

2 thoughts on “How to make Linux platform available in existent console applications

  1. Edmilson says:

    Very Cool!!! Simple!!!

  2. bah says:

    You do not know how many times I have had to “recreate” a project just to get the Linux to show. Thanks you so much.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.