Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to compile rive using amalgamated (also called unity) builds #27

Open
kunitoki opened this issue Feb 13, 2025 · 0 comments
Open

Comments

@kunitoki
Copy link

I'm delivering the Rive runtime as a single .h + .cpp file to speed up compilation using cmake UNITY_BUILD but i'm encountering several issues:

  • The library has the bad practice of using namespace rive in cpp files before declaring rive classes implementation. Consider always wrapping Rive code around namespace rive { ... } or it ends up with ambiguous symbols.
  • There is a missing pragma once in "rive/core/reader.h" and it being included in multiple translation units (that end up being the same in a unity build)
  • There are duplicated symbols, like rive::lerp that could be isolated in a math utils file.

It would be great if you could allow making the library usable with amalgamated builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant