[SDL] Text output

Vladimir Karpenko cr0acker at mail.ru
Fri Sep 27 01:58:01 PDT 2002

On Tuesday, September 10, 2002, at 12:48 PM, Jason Remley wrote:

> Hi guys,
> I've been trying to build some of my SDL projects on my iBook, but
> I ve run into a roadblock. I'm trying to use the standard Unix build
> tools from the command line. The projects compile fine, but the
> Linker complains that it cant find the SDL library. I've installed both
> the development and run-time  SDL packages, so I know they're on
> there somewhere.

As noted in the installer readme, the runtime lib is  installed in 
/Library/Frameworks and development runtime lib is in 

> So what am I missing?
> Is it it even possible to compile SDL programs from the command
> line? or do I have to use Project Builder?

You don't have to use Project Builder. Below is one way to do it. The 
other way is to get the source and build it from the command line - 
then your command will almost work (you still need to have SDLMain.o in 
there). The latter approach can also build a .app wrapper for your 

> I'm running Mac OS X (10.1) ...and here's the command in make
> 	c++  -lSDL  -lSDL_mixer -lpthread  Program.cpp  Object1.o
> Object2.o Object3.o  -oTestProg

If you installed the .pkg files for SDL and SDL_mixer, this command 
will work:

c++  -framework SDL -framework SDL_mixer  
-I$(HOME)/Library/Frameworks/SDL_mixer.framework/Headers -lpthread  
Program.cpp  SDLMain.o Object1.o
Object2.o Object3.o  -oTestProg

Note that you *need* SDLMain.o, compile that from SDLMain.m which 
you'll find by creating a new SDL project in Project Builder.

> If so, does anyone know how to login as root from the terminal?
> Whenever I try I get either "Sorry" or "Root Login not permitted on
> this Terminal".

You have to use sudo. You can't use "su",  unless you've enabled the 
root account in NetInfo Manager.

More information about the SDL mailing list