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

Author Topic: What is this?  (Read 1090 times)

0 Members and 1 Guest are viewing this topic.

TheDuceCat

  • Newbie
  • *
  • Posts: 12
    • View Profile
What is this?
« on: May 28, 2012, 01:38:45 am »
In the header for many of the classes in the graphics module, it says SFML_GRAPHICS_API before the class name. What is this?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: What is this?
« Reply #1 on: May 28, 2012, 09:26:10 am »
It's a macro which gets defined when creating makefiles/projects with CMake.
The reason is that you have to export the function/class symbols diffrently if you link staticly or dynamicly.
So CMake will depending on your settings and the used compiler/linker define the macro either for static or dynamic export.

If you don't write your own library, you don't need to know the details. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/