The linker order matters. I tend to follow the "x depends on y" rule, so if x depends on y, x has to come before y.
For example sfml-audio depends on ogg, so they can't be listed before SFML.
Ok! I have changed the link options in this:
LINKER_FLAGS = -static-libgcc -static-libstdc++ -lmingw32 -lsfml-graphics-s -lsfml-window-s -lsfml-audio-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -lfreetype -ljpeg -lopenal32 -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg
But I have these link errors:
g++ Test.cpp -ID:\Programming\dev_lib\SFML-2.4.2-Static\include -LD:\Programming\dev_lib\SFML-2.4.2-Static\lib -m64 -O3 -w -Wl,-subsystem,windows -static-libgcc -static-libstdc++ -lmingw32 -lsfml-graphics-s -lsfml-window-s -lsfml-audio-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -lfreetype -ljpeg -lopenal32 -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg -o Test
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x9): undefined reference to `__imp__ZTVN2sf4TextE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x10): undefined reference to `__imp__ZTVN2sf11VertexArrayE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text$_ZN2sf4TextD1Ev[_ZN2sf4TextD1Ev]+0x83): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x8b): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0xbb): undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0xff): undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x138): undefined reference to `__imp__ZN2sf7TextureC1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x167): undefined reference to `__imp__ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x193): undefined reference to `__imp__ZN2sf6SpriteC1ERKNS_7TextureE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x1a1): undefined reference to `__imp__ZN2sf4FontC1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x1c4): undefined reference to `__imp__ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x220): undefined reference to `__imp__ZN2sf4TextC1ERKNS_6StringERKNS_4FontEj'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x24d): undefined reference to `__imp__ZN2sf5MusicC1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x270): undefined reference to `__imp__ZN2sf5Music12openFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x29c): undefined reference to `__imp__ZN2sf11SoundStream4playEv'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x2a3): undefined reference to `__imp__ZN2sf6Window9pollEventERNS_5EventE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x2aa): undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x2b5): undefined reference to `__imp__ZNK2sf6Window6isOpenEv'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x2f2): undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x2ff): undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x310): undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x327): undefined reference to `__imp__ZN2sf6Window7displayEv'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x339): undefined reference to `__imp__ZN2sf4FontD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x340): undefined reference to `__imp__ZTVN2sf6SpriteE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x362): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x36d): undefined reference to `__imp__ZN2sf7TextureD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x376): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x3a3): undefined reference to `__imp__ZN2sf5MusicD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x3b6): undefined reference to `__imp__ZN2sf6Window5closeEv'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x3e6): undefined reference to `__imp__ZN2sf5MusicD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x3f9): undefined reference to `__imp__ZN2sf4FontD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x400): undefined reference to `__imp__ZTVN2sf6SpriteE'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x422): undefined reference to `__imp__ZN2sf13TransformableD2Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x42d): undefined reference to `__imp__ZN2sf7TextureD1Ev'
C:\Users\Black-Beast\AppData\Local\Temp\ccPHooZo.o:Test.cpp:(.text.startup+0x436): undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status
Makefile:26: recipe for target 'all' failed
mingw32-make: *** [all] Error 1
Please can you give to me an example of the right link order?
Thanks