I’m trying to program a tittle on Linux KDE Wayland and just want to open a window. I’m using VSCodium and I can’t get it to work.
Code:
#include <wayland-client-core.h>
#include <wayland-client.h>
#include <wayland-server-core.h>
#include <wayland-server.h>
#include <string>
#include <iostream>
int main(){
struct wl_display* disp = wl_display_connect(0);
return 0;
}
With the C++Runner compiler I get the error written in titel.
With g++/gcc I get “undefined reference to `main'” and “collect2: error: ld returned 1 exit status
“
I tried
pkg-config --cflags --libs=lwayland-client
g++ -o overlay.cpp $(pkg-config --cflags --libs wayland-client) -o waylandapp
changed nothing, so I also tried
g++ -o overlay.cpp -lwayland-client
I know it is basically the same but just for the record.
I also tried every command with gcc, nothing changed.
Forcii is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.