Hi,
I recently started to dig into SFML and I was happy to see the 2.0 version is cmake-enabled. I installed the required packages (debian squeeze x64)
libglew1.5-dev libxrandr-dev libfreetype6-dev libjpeg8-dev libsndfile1-dev libopenal-dev libpthread-stubs0-dev libxrandr2-dbg libx11-dev doxygen
and built it (with examples and docs) according to the example. Now the thing is, when I build it with shared libs chosen it works allright (or so it seems), but when I choose static libs I get an error building the OpenGL example.
Scanning dependencies of target opengl
[ 85%] Building CXX object examples/opengl/CMakeFiles/opengl.dir/OpenGL.cpp.o
Linking CXX executable opengl
../../lib/libsfml-graphics-s.a(Font.cpp.o): In function `sf::Font::SetCurrentSize(unsigned int) const':
Font.cpp:(.text+0x181): undefined reference to `FT_Set_Pixel_Sizes'
../../lib/libsfml-graphics-s.a(Font.cpp.o): In function `sf::Font::GetLineSpacing(unsigned int) const':
Font.cpp:(.text+0x441): undefined reference to `FT_Set_Pixel_Sizes'
../../lib/libsfml-graphics-s.a(Font.cpp.o): In function `sf::Font::GetKerning(unsigned int, unsigned int, unsigned int) const':
Font.cpp:(.text+0x8d7): undefined reference to `FT_Set_Pixel_Sizes'
Font.cpp:(.text+0x8e5): undefined reference to `FT_Get_Char_Index'
Font.cpp:(.text+0x8f2): undefined reference to `FT_Get_Char_Index'
Font.cpp:(.text+0x903): undefined reference to `FT_Get_Kerning'
../../lib/libsfml-graphics-s.a(Font.cpp.o): In function `sf::Font::Cleanup()':
...and a lot more lines like those, the full transcript
here. When I try to build other example targets individually they fail similarly.
However if I choose to build with shared libs, it looks like it finishes allright, but when I try to launch any of the example executables I get a shared library loading error:
nietaki@logical:~/zpp/SFMLbuild/examples/pong$ ./pong
./pong: error while loading shared libraries: libsfml-audio.so.2: cannot open shared object file: No such file or directory
nietaki@logical:~/zpp/SFMLbuild/examples/sockets$ ./sockets
./sockets: error while loading shared libraries: libsfml-network.so.2: cannot open shared object file: No such file or directory
Am I doing something wrong? Or is it the charm of the pre-release version
? I've seen Nexus stating he's using it already...
PS. This is also my "hello" post, I am now checking out SFML and if I end up choosing it over SDL for my BS project you'll end up stuck with me for a few months
edit: I tried it on my x86 netbook just to make sure and the results were exactly the same, I might try it under windows tommorow but if I don't get this solved I won't be able to get the platform independence my team was hoping for