
-----------------------------------
DtY
Sun Oct 11, 2009 11:15 am

Command Line Compiling on Mac OS
-----------------------------------
I have installed gcc and make, and can use them to compile simple command line applications, but, SDL seems to just be available for OS X as an XCode framework or something, so I can't use it if I'm compiling from the command line.
Is there any way to get around that?

-----------------------------------
rizzix
Sun Oct 11, 2009 11:25 am

RE:Command Line Compiling on Mac OS
-----------------------------------
[code] gcc -framework SDL -o test test.c[/code]

assuming the framework is called SDL

-----------------------------------
DtY
Sun Oct 11, 2009 12:52 pm

Re: RE:Command Line Compiling on Mac OS
-----------------------------------

So is -framework SDL like -lSDL?
Does it link with just SDL, or does it include SDL_Image, etc.?

-----------------------------------
rizzix
Sun Oct 11, 2009 1:00 pm

RE:Command Line Compiling on Mac OS
-----------------------------------
Frameworks bundles multiple libraries in them. But I'm not sure on the details.

-----------------------------------
rdrake
Sun Oct 11, 2009 7:11 pm

RE:Command Line Compiling on Mac OS
-----------------------------------
Can you still use Xcode, just it has to be from the command line?  Set up your project using Xcode, and try this in the project directory.

[code]xcodebuild[/code]

-----------------------------------
DtY
Sun Oct 11, 2009 8:09 pm

Re: RE:Command Line Compiling on Mac OS
-----------------------------------
Frameworks bundles multiple libraries in them. But I'm not sure on the details.
Okay thanks. Do I pass that to both the compiler and the linker?

Can you still use Xcode, just it has to be from the command line?  Set up your project using Xcode, and try this in the project directory.


It's not that I can't use xcode, I just don't want to bother with it. I just don't like IDEs. (So, I don't want to make an xcode project)
That's interesting to know though, I didn't know you could compile scode projects like that
