adlo
adlo

Reputation: 63

Linker error: undefined reference to ‘xdg_popup_interface’

When trying to compile my code, I get a linker error:

undefined reference to ‘xdg_popup_interface’

It seems to occur when trying to build wlr-layer-shell-v1-client-protocol.o, I think, or something like that, I’ll have to look at the output tomorrow.

AFAIK xdg_popup should be defined by wayland-protocols? My configure.ac.in has this line: PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.13], [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])

and my src/Makefile.am has this:

xfway_CFLAGS = \
$(WAYLAND_SERVER_CFLAGS) \
$(WAYLAND_PROTOCOLS_CFLAGS) \
$(LIBWESTON_CFLAGS) \
$(LIBWESTON_DESKTOP_CFLAGS) \
$(LIBINPUT_CFLAGS) \
$(XKBCOMMON_CFLAGS) \
$(EGL_CFLAGS) \
$(EVDEV_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBXFCONF_CFLAGS)

xfway_LDADD = \
$(WAYLAND_SERVER_LIBS) \
$(WAYLAND_PROTOCOLS_LIBS) \
$(LIBWESTON_LIBS) \
$(LIBWESTON_DESKTOP_LIBS) \
$(LIBINPUT_LIBS) \
$(XKBCOMMON_LIBS) \
$(EGL_LIBS) \
$(EVDEV_LIBS) \
$(PIXMAN_LIBS) \
$(GTK_LIBS) \
$(LIBXFCONF_LIBS)

The autotools output listed no cflags or libs for wayland-protocols, is this normal? Though autotools detected an installed version, so it’s definitely installed.

Here is the rest of my code: https://github.com/adlocode/xfway

This seems to be a part that mentions xdg-popup: https://github.com/adlocode/xfway/blob/master/protocol/wlr-layer-shell-unstable-v1.xml#L194

As far as I can see everything that is needed is there, what am I missing?

Update: Is it that I have to generate xdg-shell header files myself using wayland-scanner?

Upvotes: 0

Views: 940

Answers (1)

adlo
adlo

Reputation: 63

I solved this by generating header files from the xdg-shell XML file using wayland-scanner, and compiling them into my project.

Upvotes: 0

Related Questions