Building a Linux ‘Hello World’ Console Application

From RAD Studio
Jump to: navigation, search

Go Up to Linux Application Development


This topic explains the essential steps for creating an application in Delphi.

Prerequisites

To develop a Linux application, you need to prepare your Linux machine. To do it, follow the steps covered in the Linux Application Development topic

Creating the 'Hello World' application

  1. On the Welcome Page of the RAD Studio, click Create a new project, select Console Application, and then click OK.
  2. In the Code template that is displayed in the Code Editor, enter the following:
    • For Delphi, enter the following statements after the try keyword and before the except keyword:
    Writeln(‘Hello World (From RAD Studio!)’);
    Readln;
  3. Save the application.
  4. In the Project Manager, right-click the Target Platforms node, and in the Select Platform dialog, select 64-bit Linux, and then click OK.
    Tip: To activate the platform, select the Make the selected platform active check box or double-click the needed platform in the Project Manager.
  5. Click the Run button. The application compiles and displays a console window with your "Hello World (From RAD Studio!)" message.
  6. In the terminal, press Enter. The console window closes when the program terminates.

See Also

Linux Application Development