Skip to content

This is a basic tutorial to install SDL 1.2 or 2 on macOS

License

Notifications You must be signed in to change notification settings

akosbalogh/macOS_SDL_Installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS SDL installer with Sample code

This is a basic tutorial to install SDL 1.2 or 2 on macOS

Table of contents:

Install SDL 1.2

  1. Get install-sdl.sh. (Alt+Click)

  2. Open Terminal.

  3. In Terminal:

    cd ~/Downloads/ (Or where install-sdl.sh is.)

    sh install-sdl.sh

Now, SDL 1.2 is installed.

To use it, you can use gcc compiler:

gcc sample-sdl-code.c -o workingSDL `sdl-config --cflags --libs` -lSDL -lSDLmain -lSDL_gfx -lSDL_ttf -lSDL_image -lSDL_mixer -framework Cocoa

To include it in your C projects:

...
#include <SDL/SDL.h>
#include <SDL_gfx/SDL_gfxPrimitives.h>
...

Install SDL 2

(TODO)

Using SDL with CLion

(TODO) (other_resources/CMakeLists.txt)

Using SDL with XCode

(TODO) (Just linker flag setup)

About

This is a basic tutorial to install SDL 1.2 or 2 on macOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published