I’m using Ubuntu Focal LTS and Urho3D 1.7.1 Source.
CMake (GUI) runs fine, but when I build on CodeBlocks it happens:
/usr/bin/ld: ../../../lib/libUrho3D.a(SDL_x11dyn.c.o): in function `SDL_X11_LoadSymbols':
SDL_x11dyn.c:(.text+0x94e): undefined reference to `XAllocSizeHints'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x966): undefined reference to `XAllocWMHints'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x974): undefined reference to `XAllocClassHint'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x982): undefined reference to `XAutoRepeatOn'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x990): undefined reference to `XAutoRepeatOff'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x99e): undefined reference to `XChangePointerControl'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9ac): undefined reference to `XChangeProperty'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9ba): undefined reference to `XCheckIfEvent'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9c8): undefined reference to `XClearWindow'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9d6): undefined reference to `XCloseDisplay'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9e4): undefined reference to `XConvertSelection'
/usr/bin/ld: SDL_x11dyn.c:(.text+0x9f2): undefined reference to `XCreateBitmapFromData'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa00): undefined reference to `XCreateColormap'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa0e): undefined reference to `XCreatePixmapCursor'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa1c): undefined reference to `XCreateFontCursor'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa2a): undefined reference to `XCreateFontSet'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa38): undefined reference to `XCreateGC'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa46): undefined reference to `XCreateImage'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa54): undefined reference to `XCreateWindow'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa62): undefined reference to `XDefineCursor'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa70): undefined reference to `XDeleteProperty'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa7e): undefined reference to `XDestroyWindow'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa8c): undefined reference to `XDisplayKeycodes'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xa9a): undefined reference to `XDrawRectangle'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xaa8): undefined reference to `XDisplayName'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xab6): undefined reference to `XDrawString'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xac4): undefined reference to `XEventsQueued'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xad2): undefined reference to `XFillRectangle'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xae0): undefined reference to `XFilterEvent'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xaee): undefined reference to `XFlush'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xafc): undefined reference to `XFree'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb0a): undefined reference to `XFreeCursor'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb18): undefined reference to `XFreeFontSet'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb26): undefined reference to `XFreeGC'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb34): undefined reference to `XFreeFont'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb42): undefined reference to `XFreeModifiermap'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb50): undefined reference to `XFreePixmap'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb5e): undefined reference to `XFreeStringList'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb6c): undefined reference to `XGetAtomName'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb7a): undefined reference to `XGetInputFocus'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb88): undefined reference to `XGetErrorDatabaseText'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xb96): undefined reference to `XGetModifierMapping'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xba4): undefined reference to `XGetPointerControl'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbb2): undefined reference to `XGetSelectionOwner'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbc0): undefined reference to `XGetVisualInfo'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbce): undefined reference to `XGetWindowAttributes'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbdc): undefined reference to `XGetWindowProperty'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbea): undefined reference to `XGetWMHints'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xbf8): undefined reference to `XGetWMNormalHints'
/usr/bin/ld: SDL_x11dyn.c:(.text+0xc06): undefined reference to `XIfEvent'
It seens it not linking SDL compiled library or -lX11, but if I check on CMake “X11_SHARED” it works and then it goes wrong again with alsa and pulseaudio (same, unchecked, then I need to check them to compile)
sorry for my english