Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Migrating to SFML 3.0 - No sfml-main[-d].lib?  (Read 265 times)

0 Members and 3 Guests are viewing this topic.

Guido_Ion

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Flow Soccer development
[SOLVED] Migrating to SFML 3.0 - No sfml-main[-d].lib?
« 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.
« Last Edit: February 18, 2025, 02:03:11 am by Guido_Ion »

kojack

  • Sr. Member
  • ****
  • Posts: 359
  • C++/C# game dev teacher.
    • View Profile
Re: Migrating to SFML 3.0 - No sfml-main[-d].lib?
« Reply #1 on: February 17, 2025, 07:01:23 am »
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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11144
    • View Profile
    • development blog
    • Email
Re: Migrating to SFML 3.0 - No sfml-main[-d].lib?
« Reply #2 on: February 17, 2025, 08:16:56 am »
Actually, that's a mistake and one that I thought, I had fixed 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.
« Last Edit: February 17, 2025, 09:37:12 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Guido_Ion

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Flow Soccer development
Re: Migrating to SFML 3.0 - No sfml-main[-d].lib?
« Reply #3 on: February 17, 2025, 08:39:20 pm »
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.
« Last Edit: February 18, 2025, 02:02:57 am by Guido_Ion »