GithubHelp home page GithubHelp logo

mhjame / sdl2-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gungui98/sdl2-boilerplate

0.0 0.0 0.0 4.6 MB

setup guide for SDL-2 project

License: MIT License

CMake 1.02% C++ 2.08% Shell 0.08% C 96.26% Objective-C 0.56%

sdl2-boilerplate's Introduction

SDL2-Demo

This is setup guide for SDL2 project

Linux

Prequisites: SDL-2, SDL-2-Image

To setup the nesscessary packages:

sudo apt-get update &&\
sudo apt-get install -y libsdl2-image-dev\ 
libsdl2-dev cmake build-essential --fix-missing

After install the developer versions of SDL2 and SDL2_image:

cd SDL2-Demo
mkdir build
cd build
cmake ..
make
./MyGame

Windows x64

Assuming CodeBlock 20.03 is installed (with MinGW64)

Step 1: Download SDL-2 Library

  • Download the SDL-2 from this link SDL
  • Extract the file, for example, to C:\Users\ADMIN\Downloads\SDL2-devel-2.0.14-mingw\SDL2-2.0.14 -- Copy all file from C:\Users\ADMIN\Downloads\SDL2-devel-2.0.14-mingw\SDL2-2.0.14\x86_64-w64-mingw32\bin to C:\Windows\system32 and C:\Windows\sysWoW64

Step 2: Create new SDL2.0 project

  • From CB Select file->new->project...->SDL2.0

  • Enter project name and choose the path to SDL2 library eg. C:\Users\ADMIN\Downloads\SDL2-devel-2.0.14-mingw\SDL2-2.0.14\x86_64-w64-mingw32\

  • Choose GNU/GCC compiler (this is selected by default, if not, please reinstall CB with MinGW64)

Step 3: Add SDL-2 linker to project

  • From project name (with colored windows icon), right click to select build options
  • Click search directory
  • From Compiler option choose Add , paste the path <path-to-sdl-2>\SDL2-2.0.14\x86_64-w64-mingw32\include\SDL2 and confirm
  • From Linker option choose Add , paste the path <path-to-sdl-2>\SDL2-2.0.14\x86_64-w64-mingw32\lib and confirm

Step 4: build and run example.

  • Build and Run the project

sdl2-boilerplate's People

Contributors

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