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

Author Topic: Compilation in Visual Studio results in "non-dll interface class" error.  (Read 151 times)

0 Members and 1 Guest are viewing this topic.

moticon

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
I have a simple graphics example which does just a few basic actions with some sprites.

After upgrading to 3.0 and updating properties, I'm still getting a warning from Visual Studio:

Warning   C4275   non dll-interface class 'std::runtime_error' used as base for dll-interface class 'sf::Exception'   game   C:\SFML-3.0.0\include\SFML\System\Exception.hpp   41      

In Exception.hpp the class SFML_SYSTEM_API Exception is based on std::runtime_error and this is the source of the warning.

Is there something I can do to remove this warning when I compile?
Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11110
    • View Profile
    • development blog
    • Email
Re: Compilation in Visual Studio results in "non-dll interface class" error.
« Reply #1 on: January 28, 2025, 10:24:11 pm »
Yeah, I've seen that warning pop up in VS for me as well.

Can you open an issue on GitHub so we keep track of it.
Will have to look more closely at it and if it's okay, silence the warning locally.

If you want to get rid of it, you could temporarily silence the C4275 warning in your project.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/