SFML community forums

Help => General => Topic started by: wademcgillis on October 02, 2009, 12:25:03 am

Title: Can't Static Link Ubuntu 8.10
Post by: wademcgillis on October 02, 2009, 12:25:03 am
Whenever I try to static link in Ubuntu 8.10,

Quote

/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(Window.o)||In function `sf::Window::Display()':|
Window.cpp:(.text+0x633)||undefined reference to `sf::Sleep(float)'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetDesktopVideoMode()':|
VideoModeSupport.cpp:(.text+0xe0)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0xf9)||undefined reference to `XRRConfigCurrentConfiguration'|
VideoModeSupport.cpp:(.text+0x10f)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x169)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)':|
VideoModeSupport.cpp:(.text+0x1f9)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0x216)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x35f)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::CleanUp()':|
WindowImplX11.cpp:(.text+0xac8)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0xae1)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0xb2e)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0xb39)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::SwitchToFullscreen(sf::VideoMode const&)':|
WindowImplX11.cpp:(.text+0x1c6d)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0x1c8a)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0x1ca8)||undefined reference to `XRRConfigSizes'|
WindowImplX11.cpp:(.text+0x1d2f)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0x1d47)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::~FontLoader()':|
FontLoader.cpp:(.text+0xf2f)||undefined reference to `FT_Done_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::~FontLoader()':|
FontLoader.cpp:(.text+0xf5f)||undefined reference to `FT_Done_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::CreateBitmapFont(FT_FaceRec_*, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x10d8)||undefined reference to `FT_Set_Pixel_Sizes'|
FontLoader.cpp:(.text+0x114d)||undefined reference to `FT_Select_Charmap'|
FontLoader.cpp:(.text+0x11c7)||undefined reference to `FT_Load_Char'|
FontLoader.cpp:(.text+0x11e7)||undefined reference to `FT_Get_Glyph'|
FontLoader.cpp:(.text+0x1215)||undefined reference to `FT_Glyph_To_Bitmap'|
FontLoader.cpp:(.text+0x1754)||undefined reference to `FT_Done_Glyph'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::FontLoader()':|
FontLoader.cpp:(.text+0x1b59)||undefined reference to `FT_Init_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::FontLoader()':|
FontLoader.cpp:(.text+0x1d79)||undefined reference to `FT_Init_FreeType'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::LoadFontFromMemory(char const*, unsigned int, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x1f22)||undefined reference to `FT_New_Memory_Face'|
FontLoader.cpp:(.text+0x1fe4)||undefined reference to `FT_Done_Face'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-graphics-s.a(FontLoader.o)||In function `sf::priv::FontLoader::LoadFontFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':|
FontLoader.cpp:(.text+0x219d)||undefined reference to `FT_New_Face'|
FontLoader.cpp:(.text+0x2293)||undefined reference to `FT_Done_Face'|
||=== Build finished: 31 errors, 21 warnings ===|
Title: Can't Static Link Ubuntu 8.10
Post by: christoph on October 02, 2009, 12:31:43 am
You'll need to pass in all the other libs for static liking as well I guess (freetype and xlib if I parse that correctly)
Title: Can't Static Link Ubuntu 8.10
Post by: wademcgillis on October 02, 2009, 12:33:54 am
NEVERMIND
Title: Can't Static Link Ubuntu 8.10
Post by: wademcgillis on October 02, 2009, 12:45:48 am
Now I'm getting this...

Quote
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(Window.o)||In function `sf::Window::Display()':|
Window.cpp:(.text+0x633)||undefined reference to `sf::Sleep(float)'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetDesktopVideoMode()':|
VideoModeSupport.cpp:(.text+0xe0)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0xf9)||undefined reference to `XRRConfigCurrentConfiguration'|
VideoModeSupport.cpp:(.text+0x10f)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x169)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(VideoModeSupport.o)||In function `sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)':|
VideoModeSupport.cpp:(.text+0x1f9)||undefined reference to `XRRGetScreenInfo'|
VideoModeSupport.cpp:(.text+0x216)||undefined reference to `XRRConfigSizes'|
VideoModeSupport.cpp:(.text+0x35f)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::CleanUp()':|
WindowImplX11.cpp:(.text+0xac8)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0xae1)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0xb2e)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0xb39)||undefined reference to `XRRFreeScreenConfigInfo'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::UseVerticalSync(bool)':|
WindowImplX11.cpp:(.text+0x1745)||undefined reference to `glXGetProcAddress'|
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libsfml-window-s.a(WindowImplX11.o)||In function `sf::priv::WindowImplX11::SwitchToFullscreen(sf::VideoMode const&)':|
WindowImplX11.cpp:(.text+0x1c6d)||undefined reference to `XRRGetScreenInfo'|
WindowImplX11.cpp:(.text+0x1c8a)||undefined reference to `XRRConfigCurrentConfiguration'|
WindowImplX11.cpp:(.text+0x1ca8)||undefined reference to `XRRConfigSizes'|
WindowImplX11.cpp:(.text+0x1d2f)||undefined reference to `XRRSetScreenConfig'|
WindowImplX11.cpp:(.text+0x1d47)||undefined reference to `XRRFreeScreenConfigInfo'|
||=== Build finished: 18 errors, 21 warnings ===|
Title: Can't Static Link Ubuntu 8.10
Post by: K-Bal on October 02, 2009, 12:57:12 am
Why are you trying to link statically? :D
Title: Can't Static Link Ubuntu 8.10
Post by: wademcgillis on October 02, 2009, 01:03:58 am
So I can distribute my game without having users install SFML
Title: Can't Static Link Ubuntu 8.10
Post by: Laurent on October 02, 2009, 07:48:17 am
It's usually not a good idea on Linux.

While DLLs can lead to several problems on Windows, and static build can be a good solution, installing a library on Linux is standard and easy to do.
Title: Can't Static Link Ubuntu 8.10
Post by: Hiura on October 02, 2009, 06:13:12 pm
Quote from: "Wavesonics"
I still haven't released a Linux version of my SFML project because SFML 1.5 isn't in the Ubuntu repos. That and I don't know how to do packaging, but I suppose I will learn some day since I sure would like to actually leverage my cross-platform...ness.
It's long to package manually but it's easy. Everything is in debian's doc.