-
Notifications
You must be signed in to change notification settings - Fork 2k
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
undefined reference to xcb_get_setup when using SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS #12244
Comments
Small update : I ended up switching to OpenSUSE-TumbleWeed so I can't really test this any further, but it seems to work better on there. It might be related to the way libX11-devel is handled. On OpenSUSE you get libX11.so and libXext.so wherease on Ubuntu you get a bunch of static libraries with seemingly missing dependencies. This could also be caused by FindX11.cmake that seems to consider XCB an optional dependency when it's not anymore. Manually adding xcb to link flags seems to do the trick but I'm unsure as to how to handle this properly. Here is how I did it for now :
|
Why do you need a static |
Nah, I was just making suppositions as to how it was handled. It seems like libxcb.a has missing symbols too on Ubuntu anyway (I was very confused trying to figure it out) |
Ubuntu should just work out of the box, even when used on WSL2. |
Defining |
Thing is without this define compilation fails on Ubuntu through WSL, the compiler complaining about redefinition of |
I had difficulties figuring out the required dev libraries, is there an exhaustive list of them in the doc somewhere? |
See https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies |
Oh thank you very much! I wandered aimlessly in the Wiki located here, and I just found out it was linked inside the Installation section when I was expecting a Build section instead since SDL is already available for installation on most linux/unix based systems through the standard repositories... |
Issue
When trying to build SDL2 manually, when using
SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
linking fails with undefined reference toxcb_get_setup
and/lib/x86_64-linux-gnu/libxcb.so.1: error adding symbols: DSO missing from command line
.It seems like the linker attempts to link with libxcb.so instead of libxcb.a
Build options
System specs
I feel like this is linked to #12243
The text was updated successfully, but these errors were encountered: