Giter Site home page Giter Site logo

lewisn3142 / template_sfml_x64_project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.13 MB

A template Visual Studio project for creating applications with 64-bit SFML. Linker and compiler settings come pre-configured. See the readme for setup instructions.

C++ 100.00%

template_sfml_x64_project's Introduction

Template_SFML_x64_Project

This project was originally built using Visual C++20 in Visual Studio 2022 and uses the Visual C++17 64-bit version of SFML 2.6.1. Please ensure you have a 64-bit compatible system before attempting to compile and run this application. In order to compile the code locally and run it using Visual Studio, you should follow the instructions below, ensuring that software versions match where possible to avoid any unwanted errors.

  • Download and Install Visual Studio 2022.
  • Clone or Download and Extract this repository to an appropriate directory on your local machine. You should end up with a folder called Template_SFML_x64_Project.
    • Note: If you Download this project rather than Cloning it, you may find that after extracting the files from the .zip folder, there is a second folder called Template_SFML_x64_Project within the first one. It is this inner folder you want -- move the inner folder to your desired directory and delete the (now empty) outer folder.
  • Download SFML. You will need the Visual C++17 (2022) 64-bit version of SFML 2.6.1.
  • Extract the SFML files from the .zip folder you just downloaded.
  • Inside the SFML-2.6.1-windows-vc17-64-bit folder you will find a folder named SFML-2.6.1. Move this SFML-2.6.1 folder to the same directory as the Template_SFML_x64_Project folder you obtained earlier, but NOT inside the Template_SFML_x64_Project folder itself.
  • Rename SFML-2.6.1 to SFML_x64.

Your final folder hierarchy should look like

  • CHOSEN_DIRECTORY
    • Template_SFML_x64_Project
      • PROJECT_FILES
    • SFML_x64
      • FILES FROM SFML-2.6.1

If so then that's it, you're good to go!

It is a bit tricky to rename projects in Visual Studio, so if you would like to apply this template to your own work, simply install SFML in the manner described above, relative to your own project folder rather than the Template_SFML_x64_Project folder. Then copy over the sfml .dll files from the Template_SFML_x64_Project into the root of your project folder. Finally, rename the Template_SFML_x64_Project.vcxproj file to MY_PROJECT_NAME.vcxproj and copy that to the same location as the .dll files. You will need to overwrite the .vcxproj file that Visual Studio automatically creates.

The build options you will need to use are x64 and Debug in order for the code to compile correctly. Also ensure that your C++ Language Standard (found under Project > Project Properties > Configuration Properties > General > General Properties in Visual Studio) is set to ISO C++20 Standard (/std:c++20). The linker and compiler, along with the above build options and standards, should be set up appropriately by default due to the .vcxproj file included in this repository, however if Visual Studio fails to read this file for any reason, you may have to alter these settings manually. If you need to change the linker and compiler settings manually, I recommend following the Setting up SFML chapter of John Horton's book Beginning C++ Game Programming.

Note that the .dll files included in this repository also need to be copied into the folder where the executable is generated in order for the executable to run. This is usually x64 > Debug.

template_sfml_x64_project's People

Contributors

lewisn3142 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.