This repository contains everything you need to start off your SFML project in Visual Studio Code for Linux. It comes preloaded with SFML 2.5.1, as the name suggests.
-
What are the folders used for?
bin
contains the binary files of the projectcontent
contains the resources used such as images, fonts etc.include
here you can find your include files and folders for your external libraries, such asinclude/SFML
, used in a code example such as#include <SFML/Window.hpp>
lib
your lib files for the external libraries usedsrc
everything about your own code files
-
What if i want to add a library or modify the Makefile?
= You need to have the library that you want to add with its lib files and include files first, it does need to be compatible with the running system.
= Here are the basic steps:- Add the
lib
files in thelib
folder (of the project one) - Add the
include
folder in theinclude
folder (of the project one), for better use, theinclude
folder of the library should be its library name, for example,SFML
(seen ininclude/SFML
) - Add the libraries to the
Makefile
file of the project, the line that you need to edit isLIBRARIES
, seen in the project asLIBRARIES := -lsfml-graphics -lsfml-window -lsfml-system
, if you want to add, lets say, SFML networking, just add-lsfml-network
to the line, making it to 'LIBRARIES := -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network'
It is noted that some libraries require more configuration in the
Makefile
file, for this, you should look into the documentation of the library that you want to add. - Add the