CSFML is an interface of SFML for the C Language, because SFML only works natively in C++.
It is available for Windows, GNU/Linux and macOS.
The good thing about having CSFML also installed on your system is that several other programming languages that have bindings for SFML, use CSFML as a wrapper instead of SFML itself.
Example on Ubuntu:
If you want to install everything at once:
See here for Arch Linux and here for Fedora. For other distros use your system’s package manager search!
For Windows you must download this link, unzip and move to the C:\
drive, another alternative is also to use NuGet :
There is also a download for macOS, however, you can also use Brew, to do this just run the command:
You can also compile from scratch, but remember that you must first have SFML installed as a dependency. To do this, run the commands below:
Create an example file: main.c
:
To compile:
NOTE: If you compiled from scratch and encountered an error when running the binary that is looking for file: .so
, then you will need to add the path that was installed to your $LD_LIBRARY_PATH
variable:
You can add this line to your
~/.bashrc
to automate this addition and not need to run this command every time you run CSFML binaries!
The names of the functions and how to use them are very intuitive, because if you already know SFML it is easy to deduce.
For more information visit the links: