Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL with g++ on OSX Lion

Dose anyone know how to set up SDL (simple direct media layer) on OSX Lion so I can compile my code with g++ ? I have read the "readme" that comes with the package and I have placed the frameworks folder in the relevant directory, however, this does not seem to be enough. Can anyone help me ? (I do not want to use Xcode)

like image 509
lilroo Avatar asked Jan 26 '26 11:01

lilroo


1 Answers

If you're not using XCode, and are compiling SDL projects using gcc, you can run:

gcc -o test SDLTest.c `sdl-config --cflags --libs` 
g++ -o test SDLText.c `sdl-config --cflags --libs`

This works happily for me on my mac - sdl-config --version returns 1.2.14, and I can run test :)

like image 72
simont Avatar answered Jan 28 '26 23:01

simont



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!