SFML community forums

Help => General => Topic started by: KiRtAp2 on February 10, 2019, 03:53:33 pm

Title: Unresolved external symbol when statically linking
Post by: KiRtAp2 on February 10, 2019, 03:53:33 pm
Hello,

I've been looking around for a solution to this for several hours now and nothing I find has worked so far.
I'm trying to compile a program in Visual Studio 2017. Compilation works fine, but I get the following linker error:
(click to show/hide)
VS says it happens in sfml-graphics-s.lib. These are my additional dependencies:
(click to show/hide)
I've configured the path to all these files, except opengl32.lib, winmm.lib, gdi32.lib (which windows should have by default). I'm pretty certain they're all readable by the linker though, because it complains differently if I move one.

I only use <SFML/Graphics.hpp> if that helps.

I've tried dynamic linking, which builds just fine, but the program crashes quite quickly after launch, even though I have provided it all the .dll files (it doesn't complain about not having them).
I'd much rather have a statically linked binary, although I'll survive with a dynamically linked one if it works properly.

Thank you for your help
Title: Re: Unresolved external symbol when statically linking
Post by: eXpl0it3r on February 10, 2019, 03:57:58 pm
Update Visual Studio to the latest/newer version. ;)

(see here (https://en.sfml-dev.org/forums/index.php?topic=24044.0) or here (https://en.sfml-dev.org/forums/index.php?topic=24661.0))
Title: Re: Unresolved external symbol when statically linking
Post by: KiRtAp2 on February 10, 2019, 05:03:40 pm
Thank you, that helped! :)