When trying to link the static version of the library, you'll essentially have to use the static version of the headers as well (otherwise you're essentially looking for the references at the wrong place (more specifically: with the wrong format/decoration)).
As such, when linking the static version, always make sure that SFML_STATIC
is defined before you include any SFML header.
Also, make sure to link the static version of the libraries (with a -s
suffixed).
Static SFML
- Define
SFML_STATIC
. - Link to sfml-system-s, sfml-window-s, sfml-graphics-s, etc. (or their debug versions).
Dynamic SFML
- Do not define
SFML_STATIC
. - Link to * sfml-system*, sfml-window, sfml-graphics, etc. (or their debug versions).