"private" is a reserved keyword in C++... "weston/compositor.h" cannot be included in a C++ program because "struct weston_surface" has a member variable named "private"... thus preventing the C++ program from compiling: install/include/weston/compositor.h:503:8: error: expected unqualified-id before 'private' install/include/weston/compositor.h:503:7: error: expected ';' at end of member declaration install/include/weston/compositor.h:503:15: error: expected ':' before ';' token This was fixed on "master" with the following patch and needs to be backported to the "1.0" branch: commit 7fe01b18d89ad8d59d0c6285d37e70004606b76f Author: Giulio Camuffo <giuliocamuffo@gmail.com> Date: Thu Mar 28 18:02:42 2013 +0100 sdk: be C++ friendly This renames the weston_surface's private member to configure_private and externs "C" the headers of the SDK.
We can't fix this in a stable release series, it breaks the module API. What you can do is say #define private configure_private #include "compositor.h" #undef private to work around the problem. Kristian
(In reply to comment #1) > We can't fix this in a stable release series, it breaks the module API. > What you can do is say > > #define private configure_private > #include "compositor.h" > #undef private > > to work around the problem. > > Kristian We can live with this workaround. Thanks!
(In reply to comment #1) > We can't fix this in a stable release series, it breaks the module API. > What you can do is say > > #define private configure_private > #include "compositor.h" > #undef private > > to work around the problem. > > Kristian extern "C" { #define private configure_private #include <weston/compositor.h> #undef private }
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.