Set-up SDL on Mac OSX without Xcode

"Karl" <[email protected]> Fri, 06 Jan 2017 16:53:54 +0000
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Hello. I am interested in learning SDL and intend to follow tutorials / experiment, but regardless of having searched the forums, official instructions, etc. I am having trouble figuring how I am meant to install SDL correctly on a mac *without Xcode*. 

I understand that it is probably easier to use Xcode, but I would rather have the opportunity to build a more portable application if I happen to get far enough. Otherwise it might be better to switch to a Linux development environment.

Would anyone know how to install SDL 2 on Mac OSX 10.9 for development outside the Xcode IDE? (The current Xcode installed is 6.2--the latest on the particular system)

So far I have found the following pages:
http://stackoverflow.com/questions/4591076/c-sdl-on-macosx-without-xcode
http://stackoverflow.com/questions/1854444/compiling-sdl-on-os-x-with-makefile

but the discussions describe issues mid-way in the process or with respect to much older operating systems.

This:
http://stackoverflow.com/questions/18585601/compiling-c-sdl-on-macosx?rq=1
in short, indicates that all I need to do is "download the Development Library for OSX and copy it into /Library/Frameworks/." (directly from the dmg? I thought that the dmg has only a package installer. How would I do this?)

and then run something like:

Code:
g++ Main.cpp -o main -I/Library/Frameworks/SDL2.framework/Headers -framework SDL2 -framework Cocoa



That discussion applies to Mac OSX 10.8 though, and a lot might have changed between mountain lion and mavericks. Also, I see that the Cocoa framework is linked in the above example, which suggests that I'd still create a mac-only application.

I am also wondering whether it would be possible to install SDL such that I could use *both* Xcode and makefiles / the command line or any other IDE. Would I run the .dmg to install the libraries in the usual place with the installer?

I am also interested in playing with openGL further in the future. I will be following SDL tutorials from here: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/mac/index.php 

Another option is to use an old version of code blocks (13), according to this: (is that a good option?)
https://www.youtube.com/watch?v=Bi9BPEwEMDU
but the tutorial is for a newer version of the OS, and again, I am not sure whether this would work on mavericks. Code::blocks might be the better alternative if it works.

In any case, I would appreciate any help with figuring the best way to proceed with installation and use; much of the documentation and many of the discussions
refer to older OSes, so it would be good to have a confirmation that I am following the correct prodecure in the first place.

Thank you.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org