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

Statically linking an executable with GME enabled breaks the build at link time #601

Open
nightmareci opened this issue Apr 3, 2024 · 0 comments

Comments

@nightmareci
Copy link

I'm working on a project where I want to CMake-consume (via FetchContent), build, and statically link all the dependencies (SDL, all the satellite libraries) for distributed release builds. Enabling GME breaks the build though, as it needs C++, and C++ doesn't get enabled properly in this setup, so the build output throws a bunch of C++ linking errors. For now, adding an enable_language(CXX) gets it working, but that doesn't really seem correct, I don't think a CMake project (mine) consuming another (SDL_mixer) should have to do that, if my project's code doesn't include any C++. So, somehow, C++ needs to get enabled so the final statically linked executable can get the C++ code linked in.

I've encountered this bug with both SDL2 and SDL3.

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