Giter Club home page Giter Club logo

sfml-macos's Introduction

SFML C++ MacOS Example

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

Prerequisites

  1. Git
  2. VSCode
  3. Homebrew
  4. Make

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 (example) and then clone that.


Then, open it in VSCode,

install SFML using homebrew

brew install sfml

and 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. First, you need to edit the Makefile and change the SFML_PATH variable to the path you got above. Then, open .vscode/c_cpp_properties.json and change the second entry in the includePath array to the path you got.

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 terminal. Congrats, you can now make whatever you want with SFML!

Credit

This StackOverflow answer

sfml-macos's People

Contributors

beatzoid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.