Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] SFML 2.2 Linux static linking  (Read 3575 times)

0 Members and 1 Guest are viewing this topic.

Dubmosphere

  • Newbie
  • *
  • Posts: 13
    • View Profile
[SOLVED] SFML 2.2 Linux static linking
« on: January 10, 2015, 01:49:27 pm »
Hello,

I wanted to link SFML statically on Linux Mint 17. I know that all dependencies have to be linked.
It worked in SFML 2.1 but since SFML 2.2 you switched to xcb so I'm getting those Errors (Used compiler: g++ 4.9.2 64bit):

VideoModeImpl.cpp|| Undefined reference to `XGetXCBConnection'|
VideoModeImpl.cpp|| Undefined reference to `XGetXCBConnection'|
WindowImplX11.cpp|| Undefined reference to `XSetEventQueueOwner'|
WindowImplX11.cpp|| Undefined reference to `XGetXCBConnection'|
WindowImplX11.cpp|| Undefined reference to `XSetEventQueueOwner'|
WindowImplX11.cpp|| Undefined reference to `XGetXCBConnection'|
GlxContext.cpp|| Undefined reference to `XGetXCBConnection'|
GlxContext.cpp|| Undefined reference to `XGetXCBConnection'|
GlxContext.cpp|| Undefined reference to `XGetXCBConnection'|
Display.cpp|| Undefined reference to `XGetXCBConnection'|
/usr/local/lib/libsfml-window-s.a(Display.cpp.o):Display.cpp|| Further Undefined references to `XGetXCBConnection' follow|
||=== Build failed: 11 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


These are the libraries I linked:

-lsfml-network-s
-lsfml-audio-s
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s
-lsndfile
-lopenal
-lX11
-lX11-xcb
-lxcb
-lxcb-randr
-lxcb-icccm
-lxcb-image
-ludev
-lpthread
-lGLEW
-lfreetype
-ljpeg
-lGL

The Code I want to run is only a simple window without anything else.

Thanks for your help :D

EDIT:
Solved, had to link -lX11-xcb too, the above list is complete and should work :)
« Last Edit: January 10, 2015, 09:36:41 pm by Dubmosphere »