This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Overview of Installing Vala

The Vala compiler produces C code. So you will also need a C compiler to produce the executable binary of the program. The binary runs on the native platform, although cross-compiling for other platforms is possible.

As the Vala community has grown more platforms have been added. This set of pages provides helpful notes for each platform. Often a package manager is used that also downloads dependencies, but if you encounter problems you should check you have installed:

You also need to install any libraries you may want to use in your program. Atleast the following libraries should be installed:

Testing the Install

valac is the Vala compiler and will both compile the Vala program to C and call the C compiler to produce the binary. Save the following program as my_first_program.vala

void main() {
    print( "My first Vala program!\n" );
}

Then compile the program with:

valac my_first_program.vala

To run the program on a Unix command line:

./my_first_program

To run the program on a Windows command line:

my_first_program

If there are problems look at the specific notes for your platform. Otherwise move on to the Vala Documentation.


2024-10-23 11:37