rive-cpp-legacy icon indicating copy to clipboard operation
rive-cpp-legacy copied to clipboard

Issues building on Ubuntu (16.04)

Open JCash opened this issue 4 years ago • 0 comments

Opened this issue as a discussion. I'm not sure if this is reproducible on newer Ubuntu versions (our build server uses 16.04 still).

The problem is X11.h (much like Window.h) adds names to the global namespace, that may fail consequent code. Although I was able to move the inclusion of X11.h later, I suspect it might not always be as easy for others.

On Ubuntu (16.04), if you happen to include X11.h before the rive headers, you'll get these errors:

In file included from upload/defold-rive/pluginsrc/plugin.cpp:9:
In file included from upload/defold-rive/include/artboard.hpp:6:
In file included from upload/defold-rive/include/generated/artboard_base.hpp:3:
In file included from upload/defold-rive/include/container_component.hpp:3:
In file included from upload/defold-rive/include/generated/container_component_base.hpp:3:
In file included from upload/defold-rive/include/component.hpp:3:
upload/defold-rive/include/component_dirt.hpp:9:3: error: expected identifier
                None = 0,
                ^
/usr/include/X11/X.h:115:30: note: expanded from macro 'None'
#define None                 0L /* universal null resource or null atom */

I'm not sure what a good solution is here, but perhaps a name change to e.g. Empty, Clear, Nilor something similar is acceptable.

JCash avatar Aug 06 '21 09:08 JCash