undefined reference to `xkb_utf32_to_keysym'
trying building on ubuntu linux 20.04 git cloned main repo i enter the folder then:
- medon build ok (i had to install libxkbcommon-dev)
- ninja -C build failed
ninja: Entering directory
build' [6/7] Compiling C object 'wtype@exe/main.c.o'. ../main.c: In function ‘get_key_code_by_wchar’: ../main.c:178:21: warning: implicit declaration of function ‘xkb_utf32_to_keysym’ [-Wimplicit-function-declaration] 178 | xkb_keysym_t xkb = xkb_utf32_to_keysym(ch); | ^~~~~~~~~~~~~~~~~~~ [7/7] Linking target wtype. FAILED: wtype cc -o wtype 'wtype@exe/main.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group protocol/libclient_protos.a /usr/lib/x86_64-linux-gnu/libwayland-client.so /usr/lib/x86_64-linux-gnu/libwayland-cursor.so -lrt /usr/lib/x86_64-linux-gnu/libxkbcommon.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/protocol' -Wl,-rpath-link,/home/v1p3r/src/wtype/build/protocol /usr/bin/ld: wtype@exe/main.c.o: in functionget_key_code_by_wchar': main.c:(.text+0x6fd): undefined reference toxkb_utf32_to_keysym' /usr/bin/ld: wtype@exe/main.c.o: in functionmain': main.c:(.text.startup+0x265): undefined reference to `xkb_utf32_to_keysym' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
I suppose your dependencies are too old, and don't define the xkb_utf32_to_keysym function.
For Ubuntu 20.04, I checked out this commit, which made the program compile successfully: 6280f6eb59a7586d6d01b8fa4e4100880c6ae8c6