You are already linking to opengl so I suspect the problem is in the library order. The dependencies belong behind the library in gcc. Just like you have tgui before sfml and sfml-window before sfml-system, you should put GL after tgui. This does not matter for dynamic linking, but you are linking to tgui statically.
This is unrelated but you should be aware of one thing: you should always link tgui in the same way as sfml. I have never tried static linking on linux so I can't tell if it gives problems or not, but on windows linking like you are doing leads to linking errors or crashes. Either link both tgui and sfml dynamically or link both of them statically. I would suggest dyamic linking because linking statically to sfml on linux can be a pain.
This is unrelated but you should be aware of one thing: you should always link tgui in the same way as sfml. I have never tried static linking on linux so I can't tell if it gives problems or not, but on windows linking like you are doing leads to linking errors or crashes. Either link both tgui and sfml dynamically or link both of them statically. I would suggest dyamic linking because linking statically to sfml on linux can be a pain.
, I need the project file.