Where ?
I have Windows and the officiel tutoriel say
On Windows and Mac OS X, all the required dependencies are provided alongside SFML so you won't have to download/install anything else. Building will work out of the box.
But i try to compile a static library. So, i need link all dependencies
I look a little down in the "Linux" part..
freetype
jpeg
x11 (linux only)
xrandr (linux only)
xcb (linux only)
x11-xcb (linux only)
xcb-randr (linux only)
xcb-image (linux only)
opengl
flac
ogg
vorbis
vorbisenc
vorbisfile
openal
pthread
But with that, i have this problem :
... -lroddgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lflac -logg -lvorbis -lvorbisenc -lvorbisfile -lopenal32 -lpthread -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55...
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x108): référence indéfinie vers « SwapBuffers@4 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0xa28): référence indéfinie vers « ChoosePixelFormat@8 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x124c): référence indéfinie vers « DescribePixelFormat@16 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x1284): référence indéfinie vers « SetPixelFormat@12 »
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj): bad reloc address 0x17 in section `.te
xt.unlikely'
collect2.exe: error: ld returned 1 exit status
After some research, I found was missing -lgdi32 and -lwinmm.
Finaly :
... -lroddgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lflac -logg -lvorbis -lvorbisenc -lvorbisfile -lopenal32 -lpthread -lgdi32 -lwinmm -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55 ...
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x1ec): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x204): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x38b): référence indéfinie vers « oggpack_writeclear »
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML/lib/libvorbis.a(block.o): bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status
and i'm stuck
EDIT: Ah !
http://www.sfml-dev.org/tutorials/2.3/start-cb.phpStarting from SFML 2.2, when static linking, you will have to link all of SFML's dependencies to your project as well. This means that if you are linking sfml-window-s or sfml-window-s-d for example, you will also have to link opengl32, winmm and gdi32. Some of these dependency libraries might already be listed under "Inherited values", but adding them again yourself shouldn't cause any problems.
...
Module :
sfml-audio-s
Dependencies :
sfml-system-s
flac
ogg
vorbis
vorbisenc
vorbisfile
openal32
I have all dependencies for audio
and FAQ is not updated =D
http://www.sfml-dev.org/faq.php#build-link-staticThank you ! ^^