First steps

Let's put this into main.c:

#include <stdio.h>
#include <wayland-client.h>

int main(void)
{
    struct wl_display *display = wl_display_connect(NULL);
    if (display) {
        printf("Connected!\n");
    } else {
        printf("Error connecting ;(\n");
        return 1;
    }

    wl_display_disconnect(display);
    return 0;
}

Compile and run it with:

$ gcc main.c -l wayland-client -o runme
$ ./runme
Connected!

Congratulations! We've just successfully wrote our first Wayland program.

results matching ""

    No results matching ""