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:
but the discussions describe issues mid-way in the process or with respect to much older operating systems.
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:
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?)
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.