SFML Setup Windows VScode

 What is SFML


SFML stands for Simple and Fast Multimedia Library. It is a cross-platform software development library designed to provide a simple application programming interface (API) to various multimedia components in computers. It is written in C++ with bindings available for Ada, C, Crystal, D, Euphoria, Go, Java, Julia, .NET, Nim, OCaml, Python, Ruby, and Rust. Experimental mobile ports were made available for Android and iOS with the release of SFML 2.2.

SFML provides the following modules:

  • System: Provides basic system functionality such as input, output, and timing.
  • Window: Provides a simple interface for creating and managing windows.
  • Graphics: Provides 2D graphics functionality such as drawing shapes, text, and images.
  • Audio: Provides audio functionality such as playing sounds and music.
  • Network: Provides networking functionality such as sending and receiving data over a network.

SFML is a popular choice for developing games and multimedia applications. It is easy to use, fast, and cross-platform. It is also open source and free to use.

Here are some of the benefits of using SFML:

  • Simple: SFML is very easy to use. The API is well-documented and there are many tutorials available online.
  • Fast: SFML is very fast. It is written in C++ and uses hardware acceleration whenever possible.
  • Cross-platform: SFML is cross-platform. This means that you can create an application that will run on Windows, Linux, macOS, and even Android and iOS.
  • Open source: SFML is open source. This means that it is free to use and modify. There is also a large community of SFML developers who are willing to help you with your projects.


Setup process πŸ˜ƒ


I'm 100% sure you have VScode installed on your system if not Download and setup
your development environment and don't forget  to install C/C++ extension from Vscode marketplace.  I'm pretty much sure you have installed Mingw and done some c++ practice like loops, variable, array, pointer etc. In this tutorial i will only cover setup process of SFML on Vscode.

  • Download SFML Official library, download mingw one you can choose 32bit or 64bit. It's your choice (Note: click download to redirect to SFML website)
  • Extract Zip file which is look like this:
  • Now create new folder  and copy include and lib on it after that it looks something like this:
  • And also create src folder(on this folder you will maintain your code)
  • Now create new folder called headers and move lib and include on it .
  • Open your project in vscode after opening it looks something like this.

  • create main.cpp file and simple SFML window code is here:
  • copy all the dll from the bin folder of SFML extraction location
  • After that it is almost done . let's create MakeFile and compile our first SFML project. 
  • Now open terminal and Type mingw32-make -f MakeFile 

  • It works 😍

Their is also a second way  to do it without any pain and i also explained everything on it.

Just clone or download  SFML Template from my Github repo it easy and no need to download SFML from website and doing all those stuff.

keep learning❤πŸ‚

    Next Post