Re: Set-up SDL on Mac OSX without Xcode
Sam Lantinga <[email protected]> Sat, 14 Jan 2017 13:36:20 -0800
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <CACC3sbHA5qd0RzQwez0kTA7yOO5x1nxyUia0WADsf4irRm_+Hg@mail.gmail.com> |
I think you're over-thinking this. This is the right way to go: gcc -o myprogram myprogram.c `sdl2-config --cflags --libs` It adds -framework Cocoa because that's an SDL dependency, not because you need to write Cocoa code in your application. You don't need macports, you don't need homebrew. I do all my Mac development using the command line development tools included with Xcode and downloading a few extras like automake and Mercurial. On Fri, Jan 6, 2017 at 9:18 AM, Karl <[email protected]> wrote: > Right, I understand. Xcode and the developer tools are installed, but I am > not sure how to install SDL for use with a different environment. Based on > the various discussions of Stackoverflow and the information I have, I > don't quite understand what the procedure is. > > I know that the binaries are here: > > https://www.libsdl.org/download-2.0.php > > The basic instructions are here: > > https://wiki.libsdl.org/Installation#Mac_OS_X > > ... which I don't quite understand. > > Compiling on Linux would require the following instruction: > > > > > Code: > > gcc -o myprogram myprogram.c `sdl2-config --cflags --libs` > > > > But that is unlikely to work immediately on mac. > > This command from my post above seems to use the mac-specific cocoa, which > is not desirable assuming this will keep the application mac-only: > > > > > Code: > > g++ Main.cpp -o main -I/Library/Frameworks/SDL2.framework/Headers > -framework SDL2 -framework Cocoa > > > > In short I am a little confused by the many ways to install the library > and am not sure what I need to do so I can start using the library outside > of the IDE provided with Xcode. > > Would you (or someone) who might know more about installation on Mac OSX > please clarify the instructions? Thanks again. > > _______________________________________________ > SDL mailing list > [email protected] > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org > > _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org