On Fri, 03 May 2019 05:40:46 +0100 adlo <[email protected]> wrote: > On Wed, 2019-05-01 at 12:34 +0300, Pekka Paalanen wrote: > > > > it is all just the normal Wayland protocol exchange but with a new > > interface of your own design. I'm not sure if there is a really > > minimal example, but I'll list at least some. > > > > One example of such private protocol extension is > > https://gitlab.freedesktop.org/wayland/weston/blob/master/protocol/weston-desktop-shell.xml > > > > > > autotools doesn't seem to be generating the header files. I've put > > AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable]) > AC_PATH_PROG([wayland_scanner], [wayland-scanner]) > if test x$wayland_scanner = x; then > if test "x$cross_compiling" != "xyes"; then > PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner]) > wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner > wayland-scanner` > else > AC_MSG_WARN([You are cross compiling without wayland- > scanner in your path. make check will fail.]) > fi > fi > > in my configure.ac.in. What else do I need to do?
Hi,
your Makefile.am needs the rules to generate the headers and .c files.
>
> In the meantime, I worked around it by running wayland-scanner and
> manually generating the header files, but when trying to do this:
>
> static const struct xyz_interface xyz_implementation =
> {
>
> };
>
> .......
>
> wl_global_create (server->compositor->wl_display,
> &xyz_interface, 1,
> server, bind_desktop_shell);
>
> the compiler gave me messages like "xyz_implementation has initializer
> but incomplete type" and "storage size of xyz_implementation isn't
> known" How can I resolve this?
Make sure you generate server-side headers for server side code, and
client-side headers for client side code, and include the appropriate
one.
> Also, what's the best way to include my private protocol's header
> files, being as my code is in $(topdir)/src and the protocol headers
> are in $(topdir)/protocols?
Whatever you prefer.
Thanks,
pq
pgpIISBPApb71.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
