Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Command Line Compiling on Mac OS
Index -> Programming, C -> C Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DtY




PostPosted: Sun Oct 11, 2009 11:15 am   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Sun Oct 11, 2009 11:25 am   Post subject: RE:Command Line Compiling on Mac OS

code:
gcc -framework SDL -o test test.c


assuming the framework is called SDL
DtY




PostPosted: Sun Oct 11, 2009 12:52 pm   Post subject: Re: RE:Command Line Compiling on Mac OS

rizzix @ Sun Oct 11, 2009 11:25 am wrote:
code:
gcc -framework SDL -o test test.c


assuming the framework is called SDL

So is -framework SDL like -lSDL?
Does it link with just SDL, or does it include SDL_Image, etc.?
rizzix




PostPosted: Sun Oct 11, 2009 1:00 pm   Post subject: RE:Command Line Compiling on Mac OS

Frameworks bundles multiple libraries in them. But I'm not sure on the details.
rdrake




PostPosted: Sun Oct 11, 2009 7:11 pm   Post subject: 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
DtY




PostPosted: Sun Oct 11, 2009 8:09 pm   Post subject: Re: RE:Command Line Compiling on Mac OS

rizzix @ Sun Oct 11, 2009 1:00 pm wrote:
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?

rdrake @ Sun Oct 11, 2009 7:11 pm wrote:
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

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
Display posts from previous:   
   Index -> Programming, C -> C Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: