SFML community forums
Help => General => Topic started by: Guido_Ion on February 17, 2025, 02:59:51 am
-
Hi, I'm migrating to SFML 3.0 x64 and I'm linking dynamically, I noticed that there isn't any sfml-main.lib for linking dinamically, only sfml-main-s.lib and sfml-main-s-d.lib are in the /lib folder. This happens with the x86 version also. When I link with sfml-main-s-d.lib there is an error when creating the window, as expected.
I don't know if I'm missing something or the downloads are missing those files.
-
Unlike earlier SFML versions, SFML 3 is provided (and built by default) as static libraries only, not dynamic.
You'll need to change the settings (CMake) and build SFML yourself to get dynamic libraries.
-
Actually, that's a mistake and one that I thought, I had fixed (https://github.com/SFML/SFML/pull/3346) but seems that was just for the PDB name. sfml-main always has been a static library and shouldn't have a -s suffix, because there's no other variant.
Or so I thought, will need to check with the team if we want to keep this or not.
-
Ok, I was able to use sfml-main-s.lib in Release and for Debug I don't use it, I use a /CONSOLE system. It runs ok in Release but not in Debug, it gives me a runtime error when creating the window. See attachment.
I copied all the sfml-xxxx-d-3.dll to the x64/Debug folder, I added also the libs to the properties, everything is setup. I'm using vs2022 with v143 compiler, the error refers to v140, so that's weird, any ideas?
EDIT: UPDATING VISUAL STUDIO SOLVED IT.