| Summary: | static linking breaks with applications that use X11 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | nfxjfg |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
|
Description
nfxjfg
2013-05-01 09:18:53 UTC
Did you try using ./configure --disable-x11-shared ? With "--disable-shared --disable-x11-shared" I get undefined X symbols in SDL when linking the final application binary: build_libs/lib/libSDL2.a(SDL_x11mouse.o): In function `X11_CreateXCursorCursor': SDL/./src/video/x11/SDL_x11mouse.c:97: undefined reference to `XcursorImageCreate' SDL/./src/video/x11/SDL_x11mouse.c:110: undefined reference to `XcursorImageLoadCursor' SDL/./src/video/x11/SDL_x11mouse.c:112: undefined reference to `XcursorImageDestroy' collect2: error: ld returned 1 exit status (useless path prefixes cut) With "--disable-x11-shared" it creates a .so. You should add "-lXcursor" to your link line (and have libXcursor.so installed). sdl2-config should probably be modified to add these X11 libraries if you specify --disable-x11-shared. sdl2-config has the right flags required for static linking after all, marking as invalid. |