i have this simple code in wayland :
and i installed wayland in my Freebsd system :
but when i try to compile, i get this errors (problems !):
Code:
#include <stdio.h>
#include <wayland-client.h>
int
main(int argc, char *argv[])
{
struct wl_display *display = wl_display_connect(NULL);
if (!display) {
fprintf(stderr, "Failed to connect to Wayland display.\n");
return 1;
}
fprintf(stderr, "Connection established!\n");
wl_display_disconnect(display);
return 0;
}
:~ $ sudo find / -name wayland-client.h
/usr/local/include/wayland-client.h
but when i try to compile, i get this errors (problems !):
Code:
$ gcc 1.c -o 1 -I/usr/local/include
/usr/local/bin/ld: /tmp//cczWwzQl.o: in function `main':
1.c:(.text+0x15): undefined reference to `wl_display_connect'
/usr/local/bin/ld: 1.c:(.text+0x6f): undefined reference to `wl_display_disconnect'
collect2: error: ld returned 1 exit status
$ cc 1.c -o 1 -I/usr/local/include
ld: error: undefined symbol: wl_display_connect
>>> referenced by 1.c
>>> /tmp/1-a24f58.o:(main)
ld: error: undefined symbol: wl_display_disconnect
>>> referenced by 1.c
>>> /tmp/1-a24f58.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang 1.c -o 1 -I/usr/local/include
ld: error: undefined symbol: wl_display_connect
>>> referenced by 1.c
>>> /tmp/1-51afd9.o:(main)
ld: error: undefined symbol: wl_display_disconnect
>>> referenced by 1.c
>>> /tmp/1-51afd9.o:(main)
clang: error: linker command failed with exit code 1 (use -v to see invocation)