Skip to content

A example of what happens when you click the "Use this template" button

Notifications You must be signed in to change notification settings

Beatzoid/sfml-template-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFML C++ MacOS Example

A very simple example of how to use SFML in VSCode on MacOS

Prerequisites

  1. Git
  2. VSCode
  3. Homebrew

Setup

First, clone this repo

git clone https://github.com/beatzoid/sfml-macos

Or you can click the green Use this template to automagically make a new repo under your account with all the files and then clone that.


Then, open it in VSCode.

Then, install SFML using homebrew

brew install sfml

Then, get the path to the installation

brew info sfml

You will see something like /opt/homebrew/Cellar/sfml/2.5.1_2 in the output. If the numbers differ it's ok. Edit the build.sh script and change the SFML_PATH variable to the path you got above.

Then, press Cmd+Shift+B in VSCode to build and Fn+F5 to run. If it works, you should see a window with a black background and cyan circle. Once you exit the program, you should also see the number "5" in the debug console. Congrats, you can now make whatever you want with SFML!

Todo

  • Convert from using a shell script to a Makefile. A Makefile would be much better over a shell script but I couldn't figure out how to get it to work. If you figure it out, please submit a PR :)

Credit

This StackOverflow answer

About

A example of what happens when you click the "Use this template" button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published