[SDL] fcflags and flibs

Bob Ippolito bob at redivi.com
Tue May 18 20:14:24 PDT 2004


On May 18, 2004, at 10:43 PM, Daniel Roberts wrote:

> Hello,
> I have installed SDL on my mac osx from command line and am running 
> one of the first test programs in the documentation. I am using the 
> compile command:
>
> gcc -o test test.c sdl-config --cflags --libs,
>
> which is on the linux FAQ page (no compilation instructions on the mac 
> osx FAQ page),
> and I get the following error message:
>
> cc1: unrecognized option `-fcflags'
> cc1: unrecognized option `-flibs'
>
> I don't understand how to fix this because I don't know where these 
> libraries are. I have checked in all of the SDL libraries with no 
> luck. I also have sdl-config in the source code's directory so that's 
> not the problem. Any assistance would  be greatly appreciated.

You forgot the backticks.  sdl-config is a shell script that spits out 
the compilation and linker flags used when SDL was compiled.  What you 
should be typing is something like:
gcc -o test test.c `sdl-config --cflags --libs`

However, in my experience, Xcode or Project Builder would make your 
life a whole lot easier than doing this crap by hand or with Makefiles.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040518/13ca4c79/attachment.bin>


More information about the SDL mailing list